[Previous] [Contents] [Next]

mount_smb

Mount SMB filesystems (QNX)

Syntax:

mount_smb [-h] [-m a|u|n] [-n node] [-p] [-s] [-u user]
          //[netbios-name]:IP-name/resource
          local-path
          [password]

Options:

-h
Don't substitute username for homes share name. If mounting a share with the reserved name homes (samba), SMBfsys will substitute the username for homes, thus avoiding permission problems when different users are mounting the share name homes. The -h disables this substitution.
-m a|u|n
Map file names returned by directory read operations. SMB servers typically return names in all uppercase letters, which makes using them from QNX a bit awkward. SMBfsys can translate the names to lowercase letters, as directed by the letter following the option:
a
Always map the name to lowercase letters.
u
Map the name to lowercase letters only if the original name does not have any lowercase letters in it.
n
Never map the name to lowercase letters.

The default is -m u unless -s is specified, in which case -m n is the default.

-n node
Tell the SMBfsys process running on the specified node to perform the mount. The default is to tell the SMBfsys process running on the same node mount_smb is invoked from.
-p
Mount as a printer service. Take the local_path command-line parameter as a file to be opened and written to. Generally the server will take whatever output is given and send it to a printer.
-s
Treat file names as case sensitive, if the server supports it.
-u user
Perform the mount as the specified user ID or username. (Default: current user)
netbios-name
Use netbios-name as the name of the server when establishing the NetBIOS session. By default, mount_smb assumes that the NetBIOS name is identical to the first portion of the IP-name, i.e. the portion up to the first dot (".").
IP-name
This is the TCP/IP host name or IP address of the SMB server.
resource
This is the SMB service name that you are requesting to mount. The service names are established by the SMB server so you'll have to check with the system administrator of the server to find out what they are.
local-path
This is the local directory where the mounted resources will appear.
password
If the SMB server has established a password for the service being requested, provide it here. If no password is provided, SMBfsys will use an empty password when attempting to mount the service.

Description:

The mount_smb command is used to locally mount remote filesystems through connections to SMB servers. Rather than use mount_smb directly, you should use

mount -t smb mount_smb_command_line

You do not have to be root to use mount_smb. You do, however, require write permission on the directory where local_path is situated. That is, if local_path is /smb/server1, you need write permission on /smb to perform the mount (or / if /smb does not exist).

As mentioned in the SMBfsys documentation, a machine has two names -- the NetBIOS name and the DNS name (the DNS name is what will be returned by the gethostbyname() library function). The mount_smb utility supports either type of lookup to determine the IP address of the server. If server_name contains no dots, and netbios_name is not explicitly specified (no colon in the command), then mount_smb first performs a NetBIOS name lookup on server_name. If that succeeds, the returned IP address is used as the IP of the server machine. If the NetBIOS name lookup fails to find anything, server_name is then looked up as a DNS name. If netbios_name is specified (colon on the command line) or there are dots in server_name, then server_name is either an explicit numeric IP address, or is subjected to a DNS name lookup only.

Examples:


Note: Typically, mount_smb is invoked via the mount utility. Only if this is not possible should the mount_smb utility be run directly. The mount -t smb command will invoke mount_smb for you.

Start the SMBfsys manager, then mount a remote resource. The NetBIOS name of the server is APPSERVER, the server is found on the IP host 192.9.200.12 and the resource we want is /docs which was shared by APPSERVER. It will appear in the local filesystem as /mnt/docs:

SMBfsys &
mount_smb //APPSERVER:192.9.200.12/docs /mnt/docs

If 192.9.200.12 has an entry in the /etc/hosts file or you are running some form of name resolution, you could use the symbolic name instead of the IP name. For instance, if 192.9.200.12 is the IP address for marino, then we could have used the following form :

    mount_smb //APPSERVER:marino/docs /mnt/docs

Exit status:

0
Successful completion.
>0
An error occurred.

See also:

user_smb, SMBfsys, mount, mount_cdfs, mount_iso9660


[Previous] [Contents] [Next]