LinuxCommandLibrary

smbcquotas

Manage Samba share quotas

SYNOPSIS

smbcquotas [OPTIONS] <smb://server/share>
smbcquotas -U <username>[%<password>] [-W <workgroup>] [-N] <smb://server/share>

PARAMETERS

smb://server/share
    The target SMB URL specifying the server and share to query. This is a mandatory argument.

-U [%] or --user=[%]
    Specifies the username and optionally the password for authentication.

-P or --password=
    Specifies the password to use. This overrides a password provided with -U.

-W or --workgroup=
    Specifies the workgroup or domain to authenticate against.

-N or --no-pass
    Specifies that no password should be asked for (e.g., for anonymous access).

-d or --debuglevel=
    Sets the debug level (0-10) for logging, controlling the verbosity of output.

-s or --configfile=
    Specifies an alternative Samba configuration file to use instead of the default.

-l or --logfile=
    Sets the log file name for debug messages.

-V or --version
    Prints the program version number and exits.

-S or --servername=
    Specifies the server name to connect to explicitly.

-R or --resolve-routing
    Resolve the server name with routing information.

-i or --ipaddress=
    Connect to the specified IP address instead of resolving the server name.

-p or --port=
    Connect to the specified TCP port number (default is 445 or 139).

-I or --target-ip=
    Specify the target IP address to connect to.

--option==
    Sets a smb.conf option directly, overriding default or configuration file settings.

DESCRIPTION

smbcquotas is a command-line utility from the Samba suite that allows administrators to query disk quota information on remote Samba, SMB, or CIFS network shares. It communicates with the specified server and share to retrieve details such as user, group, and project quota limits, current usage, and grace periods. This tool is essential for managing storage resources and enforcing disk usage policies in environments where Windows or Samba file servers are used. It can report on various metrics including block usage, inode usage, and their respective soft and hard limits.

CAVEATS

smbcquotas relies on the remote Samba/Windows server supporting quota information retrieval via SMB/CIFS protocols; not all servers or configurations might expose this data. The command typically requires appropriate authentication and permissions on the target share to query quota information. The output format can be verbose, requiring careful parsing for automated scripts. Authentication issues are common; ensure the correct username, password, and workgroup/domain are provided. Different versions of Samba might expose slightly different options or output formats.

QUOTA TYPES REPORTED

smbcquotas typically reports three types of quotas: User quotas (limits per individual user), Group quotas (limits for users belonging to a specific group), and Project quotas (limits for specific project directories or resource groups, often used in Windows environments). The command attempts to retrieve all available types from the server.

OUTPUT DETAILS

For each quota entry, smbcquotas provides detailed metrics including the filesystem, type of quota, UUID, block size, total/free/used blocks, percentage used, quota usage, soft/hard limits for blocks and inodes, and grace times before limits are enforced. This comprehensive output allows for detailed analysis of storage consumption on remote SMB shares.

HISTORY

smbcquotas is a component of the Samba suite, which has been under continuous development since the early 1990s. As network file sharing evolved and disk quotas became a standard feature on Windows servers, smbcquotas was developed to provide a native Linux command-line tool for querying these remote quota details. Its inclusion in the Samba client tools makes it an indispensable utility for administering file shares in heterogeneous networks, mirroring functionality available in Windows environments.

SEE ALSO

Copied to clipboard