1 .\" $NetBSD: mount_smbfs.8,v 1.12 2007/07/21 22:41:09 rumble Exp $
2 .\" from: Id: mount_smbfs.8,v 1.10 2002/04/16 02:47:41 bp Exp
4 .\" Copyright (c) 2003 The NetBSD Foundation, Inc.
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 .\" POSSIBILITY OF SUCH DAMAGE.
33 .Nd "mount a shared resource from an SMB/CIFS file server"
36 .Op Fl E Ar cs1 : Ns Ar cs2
39 .Op Fl M Ar crights : Ns Ar srights
41 .Op Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
42 .Op Fl R Ar retrycount
52 .No // Ar user No @ Ar server / Ar share
58 command mounts a share from a remote server using SMB/CIFS protocol.
60 The options are as follows:
61 .Bl -tag -width indent
62 .It Fl E Ar cs1 : Ns Ar cs2
69 Do not use NetBIOS name resolver and connect directly to
71 which can be either a valid DNS name or an IP address.
75 for lower/upper case conversion routines.
76 Set the locale for case conversion.
79 tries to use an environment variable
82 .It Fl M Ar crights : Ns Ar srights
83 Assign access rights to the newly created connection.
88 Do not ask for a password.
93 file for additional configuration parameters and a password.
94 If no password is found,
97 .It Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
98 Assign owner/group attributes to the newly created connection.
102 .It Fl R Ar retrycount
103 How many retries should be done before the SMB requester decides to drop
106 Timeout in seconds for each request.
107 .It Fl W Ar workgroup
108 This option specifies the workgroup to be used in the authentication request.
112 option which affects name representation.
114 can be one of the following:
115 .Bl -tag -width ".Em Value"
119 All existing file names are converted to lower case.
120 Newly created file gets a lower case.
122 All existing file names are converted to upper case.
123 Newly created file gets an upper case.
125 .It Fl f Ar mode , Fl d Ar mode
126 Specify permissions that should be assigned to files and directories.
127 The values must be specified as octal numbers.
128 Default value for the file mode
129 is taken from mount point, default value for the directory mode adds execute
130 permission where the file mode gives read permission.
132 Note that these permissions can differ from the rights granted by SMB
134 .It Fl u Ar uid , Fl g Ar gid
135 User ID and group ID assigned to files.
136 The default are owner and group IDs from
137 the directory where the volume is mounted.
138 .It No // Ns Ar user Ns @ Ns Ar server Ns / Ns Ar share
143 as the NetBIOS name of remote computer,
145 as the remote user name and
147 as the resource name on a remote server.
148 If your connections are refused, try using the
150 option and use a server name of
158 .Bl -tag -width " /etc/nsmb.conf" -compact
159 .It Pa /etc/nsmb.conf
160 System wide parameters for smbfs mounts.
162 Keeps static parameters for connections and other information.
164 .Pa /usr/share/examples/smbfs/dot.nsmbrc
168 The following example illustrates how to connect to SMB server
176 .Bd -literal -offset indent
177 mount_smbfs -I samba.mydomain.com //guest@samba/public /smb/public
178 mount_smbfs -I 192.168.20.3 -E koi8-r:cp866 //guest@samba/tmp /smb/tmp
181 If you keep on getting "Connection reset by peer" errors, try:
182 .Bd -literal -offset indent
183 mount_smbfs -N -I 10.0.0.4 //'*SMBSERVER'/tmp /smb/tmp
186 It is possible to use
190 .Dl "//guest@samba/public /smb/public smbfs rw,noauto 0 0"
194 Support for SMBFS first appeared in
196 It has been ported to
198 and first appeared in
201 .An Boris Popov Aq bp@butya.kz ,
206 .Aq deberg@NetBSD.org ,
209 .Aq jdolecek@NetBSD.org .