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 Server Message Block (SMB) client shares by using the 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 you can specify a password. If the credentials for the specified server and user set is found in the /etc/smbcred file, the command line prompts for a password if the password is not specified with the -p flag. To replace the existing password for the server-user entry that is defined in the /etc/smbcred file, specify a password that is read as a 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 an 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 for which the password will be changed with the specified password to enable access to the specified remote host.
-p password
Specifies the new password that will be used to change the existing password for the specific username of the specified remote host.

Exit status

0
The command completed successfully.
>0
An error occurred.

Example

To change the password that is stored in the /etc/smbcred file for user1 to mount the SMB client file system on the xxx.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 credentials of the SMB client file system.