Interactions with an SMB file server require authentication. For instance, when you view the shares available on an SMB server or you try to mount a share on your system, the transaction is authenticated.
You can supply the password each time that you make a connection to the server, or you can store a persistent password to be automatically used for these transactions.
You can store a persistent password for each user on the SMB server that you use to access shares.
The password you store persists until the smbadm remove-key command is run for the user.
To store the persistent password for the SMB server, type the following command:
$ smbadm add-key [-u username]
You can specify the user name as a single name or use a format such as domain\username or username@domain.
The following command stores the persistent password for user1@solarsystem. Each time user1 performs a transaction with solarsystem, the persistent password is used to perform the authentication.
$ smbadm add-key -u user1@solarsystem Password for SOLARSYSTEM/user1:
When installed, the pam_smbfs_login.so.1 module enables you to store a persistent password as if you had run the smbadm add-key command for PAM_USER in the user's or system's default domain.
This optional functionality is meant to be used only in environments that do not run AD or Kerberos, but which synchronize passwords between Oracle Solaris clients and their SMB servers.
Use your login name and password to store a persistent password.
Add the following line to the end of the /etc/pam.d/login file:
auth optional pam_smbfs_login.so.1
This action adds a persistent password entry whenever a user logs into the system, as if they had run the smbadm add-key command.
For more information, see the pam_smbfs_login(5) man page.
You can delete persistent passwords that are stored by the smbadm add-key command.
To delete a single persistent password that was created by the user running the smbadm remove-key command, type the following command:
$ smbadm remove-key -u username
For example, the following command removes the persistent password for user1@solarsystem:
$ smbadm remove-key -u user1@solarsystem
To delete all persistent passwords that were created by the user running the smbadm remove-key command, type:
$ smbadm remove-key
For example, when user mary runs the command, he removes all of the persistent passwords that he created. After the passwords are deleted, the user is prompted for a password each time that he or she performs an SMB transaction.