Manage CIFS Shares
Use the following CLI commands to manage Common Internet File System (CIFS) shares for your DXi system.
CIFS Share Administrator Privileges
When the Samba server is joined to an Active Directory Service (ADS) domain, domain users can access CIFS shares but they cannot manage the shares using the CLI. The CLI merely provides a limited capability to grant share administrator privileges to certain domain users. A share administrator is a domain user or domain group that is granted the privilege of setting share permissions.
To manage the CIFS shares, the Windows domain administrator needs to log in to the Windows server and use the Microsoft Management Console (MMC).
CIFS Share Users
Two types of users are allowed access to CIFS shares depending on whether the system is joined to a workgroup or an ADS domain. When the server is joined to a workgroup, only workgroup users can access CIFS shares, and various CLI commands provides the capabilities to manage them. Workgroup users are stored in both the local Linux database and the Samba password database.
Note: NAS is only available on certain DXi models. See your DXi User's Guide to determine whether NAS is available for your model.

Display the status of the CIFS service.
Command
syscli ‑‑getstatus cifs
Example Output
CIFS status = disabled (unconfigured)
Details:
NMB daemon not running
SMB daemon not running

Query CIFS server settings. You can query a single setting OR all settings.
Command
syscli ‑‑get smbsetting ‑‑oplocks | ‑‑dbglevel | ‑‑ldapsigning | ‑‑maxprocesses | ‑‑clientntlmv2auth | ‑‑serversigning | ‑‑strictwritethrough | ‑‑all}

Review the following attribute descriptions.
|
Queries the specified settings of the CIFS server. |
|
Queries various oplocks settings. |
|
Queries the debug level setting in the CIFS server. |
|
Queries the LDAP client signing setting: |
|
Queries the limit on the number of Samba processes: |
|
Queries the NTLMv2 login setting: |
‑‑strictwritethrough
|
Queries the strict write through setting. |
|
Queries all global and pre-share CIFS settings. |

Change CIFS server settings.You can change a single setting at a time.
Command
syscli ‑‑set smbsetting {‑‑oplocks yes|no} | {‑‑dbglevel <n>} | {‑‑ldapsigning disabled|enabled} | {‑‑maxprocesses <max_smbd_processes>} | {‑‑clientntlmv2auth yes|no} | {‑‑serversigning disabled|enabled}} | {‑‑strictwritethrough yes|no}}

Review the following attribute descriptions.
‑‑set smbsetting
|
Changes the specified CIFS server settings. |
‑‑oplocks yes|no
|
Changes the kernel oplocks setting in CIFS. In an unstable network environment, you should set the the kernel oplocks setting to no . |
‑‑dbglevel <n>
|
Changes the debug level to a nonnegative number (<n> ). The higher the value, the more verbose the log files are. A value of zero gives minimum logging (for errors only). |
‑‑ldapsigning disabled|enabled
|
Enables or disables LDAP client signing. You must enable this setting if the LDAP server signing is enabled on the ADS domain server. Otherwise, disable this setting. For more information on how to enable LDAP server signing on the ADS domain server, see Microsoft documentation at: http://support.microsoft.com/kb/935834. |
‑‑maxprocesses <max_smbd_processes>
|
Changes the maximum number of Samba processes at any given time. By default, the limit is 100. |
‑‑clientntlmv2auth yes|no
|
Changes NTLMv2 login setting to yes or no . By default, this setting is set to yes . Do not change the default setting unless the domain group policy on the ADS domain is set to exclusively use the older NTLM (v1). |
‑‑serversigning disabled|enabled
|
Changes the server signing setting to disabled or enabled . |
‑‑strictwritethrough
|
Changes strict write through setting to yes or no . |

Remove the share admin rights from an existing share administrator.
Command
syscli ‑‑del shareadmin ‑‑name <domain_user_or_group_name>

Review the following attribute descriptions.
‑‑del shareadmin
|
Reomves share administrator privileges from the specified user/group . |
‑‑name <domain_user_or_group_name>
|
You must enter the domain name after the
If you are typing in a shell, make sure to type the backslash twice. Example If the domain name is quantum.com and the user is joe, type the following command at the shell prompt:
|

Remove the share administrator rights from all domain users or groups previously granted this privilege, with the exception of the built-in domain admins group. If you specify the --sure
option, the CLI executes the command without prompting for confirmation.
Command
syscli ‑‑deleteall shareadmin [‑‑sure]

List of workgroup users created for your system.
Command
syscli ‑‑list user [‑‑name <username> |‑‑namematch <pattern>]

Review the following attribute descriptions.
|
Lists workgroups users. |
|
If you use this option, only information for the specified user name is listed. |
|
If you use this option, only workgroup users whose names match the specified pattern are listed. The wild characters
|

Add a workgroup user if the system is joined to a workgroup.
Command
syscli ‑‑add user ‑‑name <username> [‑‑password <user_password [‑‑desc <description>] [‑‑admin]

Review the following attribute descriptions.
|
Adds a user to a workgroup. |
|
Enter the user name to assign to the workgroup user. |
|
Enter the password for the workgroup user account. You can choose not to supply the password on the command line. In this case the CLI prompts you for the password and does not echo the response for security purposes. A password is required when creating a workgroup user. |
|
If you use this option, a description for the workgroup user. |
|
Grants the workgroup user administrative rights. |

Modify a workgroup user's attributes.
Command
syscli ‑‑edit user ‑‑name <workgroup_user_name> [‑‑password <user_password>] [‑‑desc <description>] [‑‑admin enabled|disabled]

Review the following attribute descriptions.
|
Edits a workgroup user's attributes. |
|
Enter the name of the workgroup user. You cannot edit the workgroup user name. |
|
Edit the password for the workgroup user account. |
|
Edit the description for the workgroup user. |
|
Edit the admin attribute for the workgroup user, either enabling or disabling administrative rights. |

Delete an existing workgroup user. The user will no longer exist in the local Linux user database as well as Samba password database.
Command
syscli ‑‑del user ‑‑name <workgroup_user_name>

Delete all existing workgroup users. If you specify the --sure
option, the CLI executes the command without prompting for confirmation.
Command
syscli ‑‑deleteall user [‑‑sure]

Display a list all workgroup users that have access to the specified CIFS share. If the returned list is empty, it means all workgroup users are allowed read-write access to the specified share.
Command
syscli ‑‑list shareuser ‑‑share <share_name>
Example Output
Total count = 1
[User = 1]
Username = userone
Access Rights = rw

Grant an existing workgroup user the right to access the specified CIFS share.
By default, a CIFS share is created with an empty initial share access list if the server is joined to a workgroup. When the share access list is empty, all workgroup users are allowed read-write access to it. Use this command to add a workgroup user to the share access list of the specified CIFS share. As soon as the share access list contains workgroup user names, only these users have access to the share.
Command
syscli ‑‑add shareuser ‑‑share <CIFS_share_name> ‑‑user <username> [‑‑rw]

Review the following attribute descriptions.
|
Adds a workgroup user to the share access list for the specified CIFS share. |
|
Enter the name of the CIFS share to which you are granting access. |
|
Enter the name of the user to whom you are granting access. |
|
If you specify this option, the user is allowed complete read-write access to the specified share. However, the effective access rights depend on the share access mode. If the share is read-only, all users can only have read-only access regardless of their settings. By default, the user has read-only access to the share. |

Remove a workgroup user's right to access the specified CIFS share.
Note: When the last workgroup user is deleted from a CIFS share, the share access list of the specified share is empty, which means the share now allows read-write access to all workgroup users.
Command
syscli ‑‑del shareuser ‑‑share <share_name> ‑‑user <username>

Review the following attribute descriptions.
|
Removes a workgroup user's access from the specified CIFS share. |
|
Enter the name of the CIFS share from which you are removing user-access. |
|
Enter the name of the user from whom you are removing access. |

Remove all workgroup user rights in accessing the specified CIFS share. If you specify the --sure
option, the CLI executes the command without prompting for confirmation.
Note: When all workgroup users are deleted from a CIFS share, the share access list of the specified share is empty, which means the share now allows read-write access to all workgroup users.
Command
syscli ‑‑deleteall shareuser ‑‑share <share_name> [‑‑sure]