mount_smbfs

mount_smbfs

 mount_smbfs { -h  -v } mount_smbfs [-u   username_or_ID   ] [-g   groupname_or_ID   ] [-f   mode   ] [-d   mode   ]  [-I   hostname_or_IP   ] [-n long] [-N] [-U   username   ] [-W   workgroup_name   ]  [-O   c_user   [:   c_group   ]/   s_user   [:   s_group   ]] [-M   c_mode   [/   s_mode   ]] [-R   num_retries   ]  [-T   timeout   ]  [-o   mount_options   ] [-x   max_mounts   ] //[   workgroup   ;][   username   [:   password   ]@]   smb_server   [/   share_name   ]   mount_point   

Description

Mounts Server Message Block (SMB) shares as filesystem volumes . It takes a share UNC and a mount point as arguments.

mount_smbfs can make use of the same configuration files used by smbutil : either .nsmbrc in the user 's home directory, or the global /usr/local/etc/nsmb.conf , which overrides per-user files. The following example .nsmbrc demonstrates some of the parameters available:

 [default] username=leonvs # NetBIOS name server nbns=192.168.1.3 [VAMANA] # server IP address addr=192.168.1.6 workgroup=TEST [VAMANA:LEONVS] password= $8465324253e0c07 

The file consists of sections, each with a heading in brackets. Besides the [default] section, headings have a server name to which the parameters in the section apply, and can also include a username and a share name.

Sections of the configuration file may not be read properly unless the hostnames and usernames in the section headings are rendered in uppercase characters .


All sections and parameter definitions in .nsmbrc are optional; everything can be specified right on the mount_smbfs command line. This option may come in handy for providing passwords for automated connections, when prompting for a password (which is the most secure method of providing it) is impractical . The value of the password parameter can be a cleartext password, but it's derived from the output of smbutil crypt password in this example. While this is better than cleartext, don't trust the encryption too much, as it's fairly weak. Make sure you restrict permissions on .nsmbrc to prevent anyone from reading your passwords.

Options/Usage


-d

Specifies directory permissions on the mounted volume, which default to the same as file permissions, plus an execute bit whenever a read bit is set. The argument is an octal mode, as described in the chmod manpage .


-f

Specifies file permissions on the mounted volume, which default to the same as those set on the mount point. The argument is an octal mode, as described in the chmod manpage.


-g

Specifies group ownership for files and directories on the mounted volume, which defaults to the same as that set on the mount point.


-h

Prints a brief usage statement to standard error.


-I

Avoids NetBIOS name resolution, connecting directly to the hostname or IP address specified as an argument.


-M

Assigns access rights to the SMB connection.


-n

With an argument of long , disables support for long filenames, restricting them to the "8.3" naming standard.


-N

Suppresses the prompt for a password. Unless a password is specified in a configuration file, authentication will fail for non-guest users.


-o

Takes - o options, as listed in the mount manpage.


-O

Assigns owner attributes to the SMB connection.


-R

Specifies the number of times to retry a mount attempt. The default is 4 .


-T

Specifies the connection request timeout (in seconds). The default is 15 .


-u

Specifies ownership for files and directories on the mounted volume, which defaults to the same as that set on the mount point.


-U

Specifies a username for authentication. This may also be part of the UNC.


-v

Prints software version to standard error.


-W

Specifies an SMB workgroup or NT domain for authentication. This may also be part of the UNC.


-x

Automatically mounts all shares from the SMB server. The argument specifies a maximum number of shares that mount_smbfs is willing to mount from a server, to forestall resource starvation when the server has a very large number of shares. If the server has more shares than max_mounts , the mount attempt is cancelled.


workgroup

The name of the SMB workgroup or NT domain to use for authentication to the SMB server.


username

The name to use for authentication to the SMB server.


password

The password to use for authentication. Note that specifying this option on the command line exposes the password in a process listing.


smb_server

The NetBIOS name of an SMB server.


share_name

The name of the SMB share you wish to access.


mount_point

The directory on which the filesystem will be mounted.

Location

/sbin



Mac OS X Panther for Unix Geeks
Mac OS X Panther for Unix Geeks
ISBN: 0596006071
EAN: 2147483647
Year: 2003
Pages: 212

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net