chsmbcred Command
Purpose
Changes the password for a specific server-user entry that is stored in the /etc/smbcred file to allow future mount operation of SMB client shares with stored credentials.
Syntax
chsmbcred -s server_name -u user_name [-p password]
Description
When you run the chsmbcred command, you must specify a server name and a username, and optionally specify a password. If the credentials for the specified server-user set is found in the /etc/smbcred file, the command line prompts for a password to replace the existing password if the password is not specified with the -p flag. The password is read as hidden input and is stored in an encrypted format in the /etc/smbcred file.
Flags
- -s server_name
- Specifies the name of the remote host, which is a Server Message Block (SMB) server. The server_name parameter can be provided as a hostname, an IP address, or a fully qualified domain name.
- -u user_name
- Specifies the username whose password is changing for access to the specified remote host.
- -p password
- Specifies the new password for the specified username on the specified remote host.
Exit status
- 0
- The command completed successfully.
- >0
- An error occurred.
Examples
- To change the password that is stored in the /etc/smbcred file for
user1
to mount the file system on thexxx.in.ibm.com
server, enter the following command:chsmbcred -s xxx.in.ibm.com -u user1
Location
/usr/sbin/chsmbcred
Files
- /etc/smbcred
- Stores the SMB client file system credentials.