Add note about umasks
[samba.git] / docs / docbook / manpages / smbmount.8.xml
1 <?xml version="1.0" encoding="iso8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3                   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4
5 <!ENTITY % globalentities SYSTEM './../global.ent'> %globalentities;
6 ]>
7 <refentry id="smbmount.8">
8
9 <refmeta>
10         <refentrytitle>smbmount</refentrytitle>
11         <manvolnum>8</manvolnum>
12 </refmeta>
13
14
15 <refnamediv>
16         <refname>smbmount</refname>
17         <refpurpose>mount an smbfs filesystem</refpurpose>
18 </refnamediv>
19
20 <refsynopsisdiv>
21         <cmdsynopsis>
22                 <command>smbmount</command>
23                 <arg choice="req">service</arg>
24                 <arg choice="req">mount-point</arg>
25                 <arg choice="opt">-o options</arg>
26         </cmdsynopsis>
27 </refsynopsisdiv>
28
29 <refsect1>
30         <title>DESCRIPTION</title>
31
32         <para><command>smbmount</command> mounts a Linux SMB filesystem. It 
33         is usually invoked as <command>mount.smbfs</command> by
34         the <citerefentry><refentrytitle>mount</refentrytitle>
35         <manvolnum>8</manvolnum></citerefentry> command when using the 
36         "-t smbfs" option. This command only works in Linux, and the kernel must
37         support the smbfs filesystem. </para>
38
39         <para>Options to <command>smbmount</command> are specified as a comma-separated
40         list of key=value pairs. It is possible to send options other
41         than those listed here, assuming that smbfs supports them. If
42         you get mount failures, check your kernel log for errors on
43         unknown options.</para>
44
45         <para><command>smbmount</command> is a daemon. After mounting it keeps running until
46         the mounted smbfs is umounted. It will log things that happen
47         when in daemon mode using the "machine name" smbmount, so
48         typically this output will end up in <filename>log.smbmount</filename>. The <command>
49         smbmount</command> process may also be called mount.smbfs.</para>
50
51         <note><para> <command>smbmount</command> 
52         calls <citerefentry><refentrytitle>smbmnt</refentrytitle>
53         <manvolnum>8</manvolnum></citerefentry> to do the actual mount. You 
54         must make sure that <command>smbmnt</command> is in the path so 
55         that it can be found. </para></note>
56         
57 </refsect1>
58
59 <refsect1>
60         <title>OPTIONS</title>
61
62         <variablelist>
63                 <varlistentry>
64                 <term>username=&lt;arg&gt;</term>
65                 <listitem><para>specifies the username to connect as. If
66                 this is not given, then the environment variable <envar>
67                 USER</envar> is used. This option can also take the
68                 form "user%password" or "user/workgroup" or
69                 "user/workgroup%password" to allow the password and workgroup
70                 to be specified as part of the username.</para></listitem>
71                 </varlistentry>
72
73                 <varlistentry>
74                 <term>password=&lt;arg&gt;</term>
75                 <listitem><para>specifies the SMB password. If this
76                 option is not given then the environment variable
77                 <envar>PASSWD</envar> is used. If it can find
78                 no password <command>smbmount</command> will prompt
79                 for a passeword, unless the guest option is
80                 given. </para>
81
82                 <para>
83                 Note that passwords which contain the argument delimiter
84                 character (i.e. a comma ',') will failed to be parsed correctly
85                 on the command line.  However, the same password defined
86                 in the PASSWD environment variable or a credentials file (see
87                 below) will be read correctly.
88                 </para>
89                 </listitem>
90                 </varlistentry>
91
92                 <varlistentry>
93                 <term>credentials=&lt;filename&gt;</term>
94                 <listitem><para>specifies a file that contains a username and/or password. 
95 The format of the file is:
96 <programlisting>
97 username = &lt;value&gt;
98 password = &lt;value&gt;
99 </programlisting></para>
100
101                 <para>This is preferred over having passwords in plaintext in a
102                 shared file, such as <filename>/etc/fstab</filename>. Be sure to protect any
103                 credentials file properly.
104                 </para></listitem>
105                 </varlistentry>
106
107                 <varlistentry>
108                 <term>krb</term>
109                 <listitem><para>Use kerberos (Active Directory). </para></listitem>
110                 </varlistentry>
111
112                 <varlistentry>
113                 <term>netbiosname=&lt;arg&gt;</term>
114                 <listitem><para>sets the source NetBIOS name. It defaults 
115                 to the local hostname. </para></listitem>
116                 </varlistentry>
117
118                 <varlistentry>
119                 <term>uid=&lt;arg&gt;</term>
120                 <listitem><para>sets the uid that will own all files on
121                 the mounted filesystem.
122                 It may be specified as either a username or a numeric uid.
123                 </para></listitem>
124                 </varlistentry>
125                 
126                 
127                 <varlistentry>
128                 <term>gid=&lt;arg&gt;</term>
129                 <listitem><para>sets the gid that will own all files on
130                 the mounted filesystem.
131                 It may be specified as either a groupname or a numeric 
132                 gid. </para></listitem>         
133                 </varlistentry>
134                 
135                 
136                 <varlistentry>
137                 <term>port=&lt;arg&gt;</term>
138                 <listitem><para>sets the remote SMB port number. The default 
139                 is 139. </para></listitem>
140                 </varlistentry>
141                 
142                 
143                 <varlistentry>
144                 <term>fmask=&lt;arg&gt;</term>
145                 <listitem><para>sets the file mask. This determines the 
146                 permissions that remote files have in the local filesystem. 
147                 This is not a umask, but the actual permissions for the files.
148                 The default is based on the current umask. </para></listitem>
149                 </varlistentry>
150                 
151
152                 <varlistentry>
153                 <term>dmask=&lt;arg&gt;</term>
154                 <listitem><para>Sets the directory mask. This determines the 
155                 permissions that remote directories have in the local filesystem. 
156                 This is not a umask, but the actual permissions for the directories.
157                 The default is based on the current umask. </para></listitem>
158                 </varlistentry>
159                 
160                 
161                 <varlistentry>
162                 <term>debug=&lt;arg&gt;</term>
163                 <listitem><para>Sets the debug level. This is useful for 
164                 tracking down SMB connection problems. A suggested value to
165                 start with is 4. If set too high there will be a lot of
166                 output, possibly hiding the useful output.</para></listitem>
167                 </varlistentry>
168                 
169                 
170                 <varlistentry>
171                 <term>ip=&lt;arg&gt;</term>
172                 <listitem><para>Sets the destination host or IP address.
173                 </para></listitem>
174                 </varlistentry>
175
176
177
178                 <varlistentry>
179                 <term>workgroup=&lt;arg&gt;</term>
180                 <listitem><para>Sets the workgroup on the destination </para>
181                 </listitem>
182                 </varlistentry>
183
184
185                 <varlistentry>
186                 <term>sockopt=&lt;arg&gt;</term>
187                 <listitem><para>Sets the TCP socket options. See the <ulink
188                 url="smb.conf.5.html#SOCKETOPTIONS"><citerefentry><refentrytitle>smb.conf</refentrytitle>
189                 <manvolnum>5</manvolnum></citerefentry></ulink> <parameter>socket options</parameter> option.
190                 </para></listitem>
191                 </varlistentry>
192
193
194                 <varlistentry>
195                 <term>scope=&lt;arg&gt;</term>
196                 <listitem><para>Sets the NetBIOS scope </para></listitem>
197                 </varlistentry>
198
199                 <varlistentry>
200                 <term>guest</term>
201                 <listitem><para>Don't prompt for a password </para></listitem>
202                 </varlistentry>
203
204                 <varlistentry>
205                 <term>ro</term>
206                 <listitem><para>mount read-only </para></listitem>
207                 </varlistentry>
208
209                 <varlistentry>
210                 <term>rw</term><listitem><para>mount read-write </para></listitem>
211                 </varlistentry>
212
213                 <varlistentry>
214                 <term>iocharset=&lt;arg&gt;</term>
215                 <listitem><para>
216                 sets the charset used by the Linux side for codepage
217                 to charset translations (NLS). Argument should be the
218                 name of a charset, like iso8859-1. (Note: only kernel
219                 2.4.0 or later)
220                 </para></listitem>
221                 </varlistentry>
222
223                 <varlistentry>
224                 <term>codepage=&lt;arg&gt;</term>
225                 <listitem><para>
226                 sets the codepage the server uses. See the iocharset
227                 option. Example value cp850. (Note: only kernel 2.4.0
228                 or later)
229                 </para></listitem>
230                 </varlistentry>
231
232                 <varlistentry>
233                 <term>ttl=&lt;arg&gt;</term>
234                 <listitem><para>
235                 sets how long a directory listing is cached in milliseconds
236                 (also affects visibility of file size and date
237                 changes). A higher value means that changes on the
238                 server take longer to be noticed but it can give
239                 better performance on large directories, especially
240                 over long distances. Default is 1000ms but something
241                 like 10000ms (10 seconds) is probably more reasonable
242                 in many cases.
243                 (Note: only kernel 2.4.2 or later)
244                 </para></listitem>
245                 </varlistentry>
246
247         </variablelist>
248
249
250 </refsect1>
251
252 <refsect1>
253         <title>ENVIRONMENT VARIABLES</title>
254
255         <para>The variable <envar>USER</envar> may contain the username of the
256         person using the client.  This information is used only if the
257         protocol level is high enough to support session-level
258         passwords. The variable can be used to set both username and
259         password by using the format username%password.</para>
260
261         <para>The variable <envar>PASSWD</envar> may contain the password of the
262         person using the client.  This information is used only if the
263         protocol level is high enough to support session-level
264         passwords.</para>
265
266         <para>The variable <envar>PASSWD_FILE</envar> may contain the pathname
267         of a file to read the password from. A single line of input is
268         read and used as the password.</para>
269 </refsect1>
270
271
272 <refsect1>
273         <title>BUGS</title>
274
275         <para>Passwords and other options containing , can not be handled.
276         For passwords an alternative way of passing them is in a credentials
277         file or in the PASSWD environment.</para>
278
279         <para>The credentials file does not handle usernames or passwords with
280         leading space.</para>
281
282         <para>One smbfs bug is important enough to mention here, even if it
283         is a bit misplaced:</para>
284
285         <itemizedlist>
286
287         <listitem><para>Mounts sometimes stop working. This is usually
288         caused by smbmount terminating. Since smbfs needs smbmount to
289         reconnect when the server disconnects, the mount will eventually go
290         dead. An umount/mount normally fixes this. At least 2 ways to
291         trigger this bug are known.</para></listitem>
292
293         </itemizedlist>
294
295         <para>Note that the typical response to a bug report is suggestion
296         to try the latest version first. So please try doing that first,
297         and always include which versions you use of relevant software
298         when reporting bugs (minimum: samba, kernel, distribution)</para>
299
300 </refsect1>
301
302
303 <refsect1>
304         <title>SEE ALSO</title>
305
306         <para>Documentation/filesystems/smbfs.txt in the linux kernel
307         source tree may contain additional options and information.</para>
308
309         <para>FreeBSD also has a smbfs, but it is not related to smbmount</para>
310
311         <para>For Solaris, HP-UX and others you may want to look at <citerefentry><refentrytitle>smbsh</refentrytitle>
312         <manvolnum>1</manvolnum></citerefentry> or at other solutions, such as 
313         Sharity or perhaps replacing the SMB server with a NFS server.</para>
314
315 </refsect1>
316
317
318 <refsect1>
319         <title>AUTHOR</title>
320         
321         <para>Volker Lendecke, Andrew Tridgell, Michael H. Warfield 
322         and others.</para>
323         
324         <para>The current maintainer of smbfs and the userspace
325         tools <command>smbmount</command>, <command>smbumount</command>,
326         and <command>smbmnt</command> is <ulink 
327         url="mailto:urban@teststation.com">Urban Widmark</ulink>.
328         The <ulink url="mailto:samba@samba.org">SAMBA Mailing list</ulink>
329         is the preferred place to ask questions regarding these programs.
330         </para>
331         
332         <para>The conversion of this manpage for Samba 2.2 was performed 
333         by Gerald Carter. The conversion to DocBook XML 4.2 for Samba 3.0
334         was done by Alexander Bokovoy.</para>
335 </refsect1>
336
337 </refentry>