]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/smbfs/mount_smbfs/mount_smbfs.8
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / smbfs / mount_smbfs / mount_smbfs.8
1 .\" $Id: mount_smbfs.8,v 1.10 2002/04/16 02:47:41 bp Exp $
2 .\" $FreeBSD$
3 .Dd September 17, 2011
4 .Dt MOUNT_SMBFS 8
5 .Os
6 .Sh NAME
7 .Nm mount_smbfs
8 .Nd "mount a shared resource from an SMB file server"
9 .Sh SYNOPSIS
10 .Nm
11 .Op Fl E Ar cs1 : Ns Ar cs2
12 .Op Fl I Ar host
13 .Op Fl L Ar locale
14 .Op Fl M Ar crights : Ns Ar srights
15 .Op Fl N
16 .Op Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
17 .Op Fl R Ar retrycount
18 .Op Fl T Ar timeout
19 .Op Fl U Ar username
20 .Op Fl W Ar workgroup
21 .Op Fl c Ar case
22 .Op Fl d Ar mode
23 .Op Fl f Ar mode
24 .Op Fl g Ar gid
25 .Op Fl n Ar opt
26 .Op Fl u Ar uid
27 .Sm off
28 .No // Ar user No @ Ar server
29 .Op Ar :port1 Op Ar :port2
30 .No / Ar share
31 .Sm on
32 .Ar node
33 .Sh DESCRIPTION
34 The
35 .Nm
36 command mounts a share from a remote server using SMB/CIFS protocol.
37 .Pp
38 The options are as follows:
39 .Bl -tag -width indent
40 .It Fl E Ar cs1 : Ns Ar cs2
41 Specifies local
42 .Pq Ar cs1
43 and server's
44 .Pq Ar cs2
45 character sets.
46 .It Fl I Ar host
47 Do not use NetBIOS name resolver and connect directly to
48 .Ar host ,
49 which can be either a valid DNS name or an IP address.
50 .It Fl L Ar locale
51 Use
52 .Ar locale
53 for lower/upper case conversion routines.
54 Set the locale for case conversion.
55 By default,
56 .Nm
57 tries to use an environment variable
58 .Ev LC_*
59 to determine it.
60 .It Fl M Ar crights : Ns Ar srights
61 Assign access rights to the newly created connection.
62 .It Fl N
63 Do not ask for a password.
64 At run time,
65 .Nm
66 reads the
67 .Pa ~/.nsmbrc
68 file for additional configuration parameters and a password.
69 If no password is found,
70 .Nm
71 prompts for it.
72 .It Fl O Ar cowner : Ns Ar cgroup Ns / Ns Ar sowner : Ns Ar sgroup
73 Assign owner/group attributes to the newly created connection.
74 .It Fl R Ar retrycount
75 How many retries should be done before the SMB requester decides to drop
76 the connection.
77 Default is 4.
78 .It Fl T Ar timeout
79 Timeout in seconds for each request.
80 Default is 15.
81 .It Fl U Ar username
82 Username to authenticate with.
83 .It Fl W Ar workgroup
84 This option specifies the workgroup to be used in the authentication request.
85 .It Fl c Ar case
86 Set a
87 .Ar case
88 option which affects name representation.
89 .Ar case
90 can be one of the following:
91 .Bl -tag -width ".Em Value"
92 .It Em Value
93 .Em Meaning
94 .It Cm l
95 All existing file names are converted to lower case.
96 Newly created file gets a lower case.
97 .It Cm u
98 All existing file names are converted to upper case.
99 Newly created file gets an upper case.
100 .El
101 .It Fl f Ar mode , Fl d Ar mode
102 Specify permissions that should be assigned to files and directories.
103 The values must be specified as octal numbers.
104 Default value for the file mode
105 is taken from mount point, default value for the directory mode adds execute
106 permission where the file mode gives read permission.
107 .Pp
108 Note that these permissions can differ from the rights granted by SMB
109 server.
110 .It Fl u Ar uid , Fl g Ar gid
111 User ID and group ID assigned to files.
112 The default are owner and group IDs from
113 the directory where the volume is mounted.
114 .It No // Ns Ar user Ns @ Ns Ar server Ns Oo Ar :port1 Ns Oo Ar :port2 Oc Oc Ns No / Ns Ar share
115 The
116 .Nm
117 command will use
118 .Ar server
119 as the NetBIOS name of remote computer,
120 .Ar user
121 as the remote user name and
122 .Ar share
123 as the resource name on a remote server.
124 Optional
125 .Ar port1
126 and
127 .Ar port2
128 arguments can be used to override default values of port numbers used
129 by communication protocols.
130 For SMB over NetBIOS default value for
131 .Ar port1
132 are 139, and
133 .Ar port2
134 are 137.
135 .It Ar node
136 Path to mount point.
137 .El
138 .Sh FILES
139 .Bl -tag -width ".Pa ~/.nsmbrc" -compact
140 .It Pa ~/.nsmbrc
141 Keeps static parameters for connections and other information.
142 See
143 .Pa /usr/share/examples/smbfs/dot.nsmbrc
144 for details.
145 .El
146 .Sh EXAMPLES
147 The following example illustrates how to connect to SMB server
148 .Em SAMBA
149 as user
150 .Em GUEST ,
151 and mount shares
152 .Em PUBLIC
153 and
154 .Em TMP :
155 .Bd -literal -offset indent
156 mount_smbfs -I samba.mydomain.com //guest@samba/public /smb/public
157 mount_smbfs -I 192.168.20.3 -E koi8-r:cp866 //guest@samba/tmp /smb/tmp
158 .Ed
159 .Pp
160 It is also possible to use
161 .Xr fstab 5
162 for smbfs mounts (the example below doesn't prompt for a password):
163 .Pp
164 .Dl "//guest@samba/public    /smb/public     smbfs  rw,noauto,-N 0   0"
165 .Sh AUTHORS
166 .An Boris Popov Aq bp@butya.kz ,
167 .Aq bp@FreeBSD.org
168 .Sh BUGS
169 Please report bugs to the author.