O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

Warning

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required