[Previous] [Contents] [Next]

user_smb

Map a QNX user to an SMB user (QNX)

Syntax:

user_smb [-n node] [-s server] [-u userid]
         smb-user [smb-password] 

Options:

-n node
Tell the SMBfsys process on the specified node about the mapping. The default is to tell the SMBfsys process on the same node that user_smb is invoked from.
-s server
Specify that this mapping is valid only for the specified SMB server. The default is that the mapping applies to all servers. This allows a single QNX user ID to map to different SMB usernames on different servers. Multiple -s options can be specified on a single command line, in which case the mapping is set for all the named servers.
-u userid
The mapping is for the specified user ID number or QNX username from the /etc/passwd file. The default is to set the mapping for the current user. Only root is allowed to use this option.
smb-user
This is the SMB username on an SMB server.
smb-password
This is the SMB password for the SMB server user.

Description:

The user_smb utility creates a mapping between a QNX user ID and an SMB username and password. Whenever a request comes in, SMBfsys checks the user ID of the requesting process against the list of user ID's that it has logged in connections for the given server. If this user ID is not currently logged into the SMB server, SMBfsys consults the mapping tables created using user_smb to find out the SMB username/password and attempts to log the user in. The mappings for the particular server is checked first (-s option) and then the mappings for all servers. If no mapping is found for a particular user ID, SMBfsys will consult the /etc/passwd file to find a user name. If it finds one for the user ID, it uses the given name and an empty password for the logon attempt. If SMBfsys can't find an entry for the user ID in /etc/passwd, it will use the username specified by its -u option and an empty password.

The SMBfsys manager does not store the mapping information in stable storage, so the mappings must be reestablished whenever SMBfsys is restarted. If user_smb is run with no password and the user ID/smb_user pair is new, the user will be prompted for the password. If user ID/smb_user has been seen before, the previous password for the pair is used. This allows users to place a user_smb command that just specifies an SMB user name in their .profile files. If SMBfsys has been restarted since the last time the user logged in to QNX, the user will be prompted to provide the password. If the information was previously entered and SMBfsys has not been restarted, no prompting occurs.

Examples:

Tell the SMBfsys manager to user the SMB ID gates for requests. The SMB password for gates is "money":

    user_smb gates money

See also:

mount_smb, SMBfsys


[Previous] [Contents] [Next]