Manage local ONTAP SMB user accounts
You can enable a local user account to allow access to SVM data over SMB, or disable the account to prevent access. You can also modify the account to update the user’s full name, description, or enabled status. If needed, you can rename the account for administrative reasons, such as a compromised username. You can also view the local groups a user belongs to, which helps determine file and folder access and troubleshoot access issues.
| If you want to… | Enter the command… |
|---|---|
Change the local user's password |
|
Enable or disable the local user account |
|
Display detailed account information for a user |
|
Display local user membership information for a specified local user |
|
Display local user membership information for the local group of which this local user is a member |
|
Display user membership information for local users that are associated with a specified storage virtual machine (SVM) |
|
Display detailed information for all local users on a specified SVM |
|
Display information about all users on the storage virtual machine (SVM) |
|
Modify the local user's description |
If the description contains a space, then it must be enclosed within double quotation marks. |
Modify the local user's full name |
If the full name contains a space, then it must be enclosed within double quotation marks. |
Rename the local user account |
When renaming a local user, the new user name must remain associated with the same CIFS server as the old user name. |
The following example renames the local user “CIFS_SERVER\sue” to “CIFS_SERVER\sue_new” on storage virtual machine (SVM, formerly known as Vserver) vs1:
cluster1::> vserver cifs users-and-groups local-user rename -user-name CIFS_SERVER\sue -new-user-name CIFS_SERVER\sue_new -vserver vs1
The following example displays information about all local users on SVM vs1:
cluster1::> vserver cifs users-and-groups local-user show -vserver vs1 Vserver User Name Full Name Description -------- --------------------------- ------------- ------------- vs1 CIFS_SERVER\Administrator James Smith Built-in administrator account vs1 CIFS_SERVER\sue Sue Jones
The following example sets the password for the local user “CIFS_SERVER\sue” associated with storage virtual machine (SVM, formerly known as Vserver) vs1:
cluster1::> vserver cifs users-and-groups local-user set-password -user-name CIFS_SERVER\sue -vserver vs1 Enter the new password: Confirm the new password:
The following example displays the membership information for all local users on SVM vs1; user “CIFS_SERVER\Administrator” is a member of the “BUILTIN\Administrators” group, and “CIFS_SERVER\sue” is a member of “CIFS_SERVER\g1” group:
cluster1::> vserver cifs users-and-groups local-user show-membership -vserver vs1
Vserver User Name Membership
---------- ---------------------------- ------------------------
vs1 CIFS_SERVER\Administrator BUILTIN\Administrators
CIFS_SERVER\sue CIFS_SERVER\g1
-
Learn more about
vserver cifsin the ONTAP command reference.
Delete local ONTAP SMB user accounts
You can delete local user accounts from your storage virtual machine (SVM) if they are no longer needed for local SMB authentication to the CIFS server or for determining access rights to data contained on your SVM.
Keep the following in mind when deleting local users:
-
The file system is not altered.
Windows Security Descriptors on files and directories that refer to this user are not adjusted.
-
All references to local users are removed from the membership and privileges databases.
-
Standard, well-known users such as Administrator cannot be deleted.
-
Determine the name of the local user account that you want to delete:
vserver cifs users-and-groups local-user show -vserver <SVM_name> -
Delete the local user:
vserver cifs users-and-groups local-user delete -vserver <SVM_name> -user-name <user_name> -
Verify that the user account is deleted:
vserver cifs users-and-groups local-user show -vserver <SVM_name>
The following example deletes the local user “CIFS_SERVER\sue” associated with SVM vs1:
cluster1::> vserver cifs users-and-groups local-user show -vserver vs1 Vserver User Name Full Name Description -------- --------------------------- -------------- ------------- vs1 CIFS_SERVER\Administrator James Smith Built-in administrator account vs1 CIFS_SERVER\sue Sue Jones cluster1::> vserver cifs users-and-groups local-user delete -vserver vs1 -user-name CIFS_SERVER\sue cluster1::> vserver cifs users-and-groups local-user show -vserver vs1 Vserver User Name Full Name Description -------- --------------------------- -------------- ------------- vs1 CIFS_SERVER\Administrator James Smith Built-in administrator account