mksmbcred Command
Purpose
Adds the credentials of the Server Message Block (SMB) client file system to the /etc/smbcred file. These credentials can be used for future mount operation of SMB client shares.
Syntax
mksmbcred -s server_name -u user_name [-p password]
Description
When you run the mksmbcred command, you must specify a server name and a username. If you do not specify a password as an argument with the -p flag, the mksmbcred command prompts for a password as a hidden character input. The password is encrypted, and the credentials are stored in the /etc/smbcred file as a server_name|username|password set. You can create multiple sets of credentials for the same server with different usernames. You can also create multiple sets of credentials with the same username for different servers.
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 credentials must be defined to access the specific remote host.
- -p password
- Specifies the password for a specific user of a specific remote host.
Exit status
- 0
- The command completed successfully.
- >0
- An error occurred.
Example
To add credentials for
user1
to mount the SMB client file system on the
xxx.in.ibm.com
server, enter the following
command:mksmbcred -s xxx.in.ibm.com -u user1
Location
/usr/sbin/mksmbcred
Files
- /etc/smbcred
- Stores the credentials of the SMB client file system.