Name
mount_smbfs
Synopsis
mount_smbfs { -h | -v } mount_smbfs [-uusername_or_ID
] [-ggroupname_or_ID
] [-fmode
] [-dmode
] [-Ihostname_or_IP
] [-n long] [-N] [-Uusername
] [-Wworkgroup_name
] [-Oc_user
[:c_group
]/s_user
[:s_group
]] [-Mc_mode
[/s_mode
]] [-Rnum_retries
] [-Ttimeout
] [-omount_options
] [-xmax_mounts
] // [workgroup
;][username
[:password
]@]smb_server
[/share_name
]mount_point
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= $$178465324253e0c07
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.
Note
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. It may come in handy for providing passwords for ...
Get Mac OS X in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.