Name
mount_smbfs
Synopsis
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
Mounts Server Message Block (SMB) shares as filesystem volumes. It takes a share UNC and a mount point as arguments.
mount_smbfs can use 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 available parameters:
[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.
Tip
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 automated connections, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access