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