mksmbcred Command
Purpose
Adds the SMB client file system credentials to the /etc/smbcred file to allow future mount operation of SMB client shares with stored credentials.
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 with the same username on different servers.
Flags
- -s server_name
- Specifies the name of the remote host, which is a 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 credentials are defined for access to the specific remote host.
- -p password
- Specifies the password for a particular user on a particular remote host.
Exit status
- 0
- The command completed successfully.
- >0
- An error occurred.
Examples
- To add credentials for
user1
to mount the SMB client file system on thexxx.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 SMB client file system credentials.