torture: smbtorture test case to verify Compound related handling
[Samba.git] / docs-xml / manpages / smbclient.1.xml
blob64a3dc285bd5e11445d04e949114559deca8383d
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="smbclient.1">
5 <refmeta>
6         <refentrytitle>smbclient</refentrytitle>
7         <manvolnum>1</manvolnum>
8         <refmiscinfo class="source">Samba</refmiscinfo>
9         <refmiscinfo class="manual">User Commands</refmiscinfo>
10         <refmiscinfo class="version">&doc.version;</refmiscinfo>
11 </refmeta>
14 <refnamediv>
15         <refname>smbclient</refname>
16         <refpurpose>ftp-like client to access SMB/CIFS resources
17         on servers</refpurpose>
18 </refnamediv>
20 <refsynopsisdiv>
21         <cmdsynopsis>
22                 <command>smbclient</command>
23                 <arg choice="opt">-b &lt;buffer size&gt;</arg>
24                 <arg choice="opt">-d debuglevel</arg>
25                 <arg choice="opt">-e</arg>
26                 <arg choice="opt">-L &lt;netbios name&gt;</arg>
27                 <arg choice="opt">-U username</arg>
28                 <arg choice="opt">-I destinationIP</arg>
29                 <arg choice="opt">-M &lt;netbios name&gt;</arg>
30                 <arg choice="opt">-m maxprotocol</arg>
31                 <arg choice="opt">-A authfile</arg>
32                 <arg choice="opt">-N</arg>
33                 <arg choice="opt">-C</arg>
34                 <arg choice="opt">-g</arg>
35                 <arg choice="opt">-i scope</arg>
36                 <arg choice="opt">-O &lt;socket options&gt;</arg>
37                 <arg choice="opt">-p port</arg>
38                 <arg choice="opt">-R &lt;name resolve order&gt;</arg>
39                 <arg choice="opt">-s &lt;smb config file&gt;</arg>
40                 <arg choice="opt">-t &lt;per-operation timeout in seconds&gt;</arg>
41                 <arg choice="opt">-k</arg>
42                 <arg choice="opt">-P</arg>
43                 <arg choice="opt">-c &lt;command&gt;</arg>
44         </cmdsynopsis>
46         <cmdsynopsis>
47                 <command>smbclient</command>
48                 <arg choice="req">servicename</arg>
49                 <arg choice="opt">password</arg>
50                 <arg choice="opt">-b &lt;buffer size&gt;</arg>
51                 <arg choice="opt">-d debuglevel</arg>
52                 <arg choice="opt">-e</arg>
53                 <arg choice="opt">-D Directory</arg>
54                 <arg choice="opt">-U username</arg>
55                 <arg choice="opt">-W workgroup</arg>
56                 <arg choice="opt">-M &lt;netbios name&gt;</arg>
57                 <arg choice="opt">-m maxprotocol</arg>
58                 <arg choice="opt">-A authfile</arg>
59                 <arg choice="opt">-N</arg>
60                 <arg choice="opt">-C</arg>
61                 <arg choice="opt">-g</arg>
62                 <arg choice="opt">-l log-basename</arg>
63                 <arg choice="opt">-I destinationIP</arg>
64                 <arg choice="opt">-E</arg>
65                 <arg choice="opt">-c &lt;command string&gt;</arg>
66                 <arg choice="opt">-i scope</arg>
67                 <arg choice="opt">-O &lt;socket options&gt;</arg>
68                 <arg choice="opt">-p port</arg>
69                 <arg choice="opt">-R &lt;name resolve order&gt;</arg>
70                 <arg choice="opt">-s &lt;smb config file&gt;</arg>
71                 <arg choice="opt">-t &lt;per-operation timeout in seconds&gt;</arg>
72                 <arg choice="opt">-T&lt;c|x&gt;IXFvgbNan</arg>
73                 <arg choice="opt">-k</arg>
74         </cmdsynopsis>
75 </refsynopsisdiv>
77 <refsect1>
78         <title>DESCRIPTION</title>
80         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
81         <manvolnum>7</manvolnum></citerefentry> suite.</para>
83         <para><command>smbclient</command> is a client that can
84         'talk' to an SMB/CIFS server. It offers an interface
85         similar to that of the ftp program (see <citerefentry><refentrytitle>ftp</refentrytitle>
86         <manvolnum>1</manvolnum></citerefentry>).
87         Operations include things like getting files from the server
88         to the local machine, putting files from the local machine to
89         the server, retrieving directory information from the server
90         and so on. </para>
91 </refsect1>
94 <refsect1>
95         <title>OPTIONS</title>
97         <variablelist>
98                 <varlistentry>
99                 <term>servicename</term>
100                 <listitem><para>servicename is the name of the service
101                 you want to use on the server. A service name takes the form
102                 <filename>//server/service</filename> where <parameter>server
103                 </parameter> is the NetBIOS name of the SMB/CIFS server
104                 offering the desired service and <parameter>service</parameter>
105                 is the name of the service offered.      Thus to connect to
106                 the service "printer" on the SMB/CIFS server "smbserver",
107                 you would use the servicename <filename>//smbserver/printer
108                 </filename></para>
110                 <para>Note that the server name required is NOT necessarily
111                 the IP (DNS) host name of the server !  The name required is
112                 a NetBIOS server name, which may or may not be the
113                 same as the IP hostname of the machine running the server.
114                 </para>
116                 <para>The server name is looked up according to either
117                 the <parameter>-R</parameter> parameter to <command>smbclient</command> or
118                 using the name resolve order parameter in
119                 the <citerefentry><refentrytitle>smb.conf</refentrytitle>
120                 <manvolnum>5</manvolnum></citerefentry> file,
121                 allowing an administrator to change the order and methods
122                 by which server names are looked up. </para></listitem>
123                 </varlistentry>
125                 <varlistentry>
126                 <term>password</term>
127                 <listitem><para>The password required to access the specified
128                 service on the specified server. If this parameter is
129                 supplied, the <parameter>-N</parameter> option (suppress
130                 password prompt) is assumed. </para>
132                 <para>There is no default password. If no password is supplied
133                 on the command line (either by using this parameter or adding
134                 a password to the <parameter>-U</parameter> option (see
135                 below)) and the <parameter>-N</parameter> option is not
136                 specified, the client will prompt for a password, even if
137                 the desired service does not require one. (If no password is
138                 required, simply press ENTER to provide a null password.)
139                 </para>
141                 <para>Note: Some servers (including OS/2 and Windows for
142                 Workgroups) insist on an uppercase password. Lowercase
143                 or mixed case passwords may be rejected by these servers.
144                 </para>
146                 <para>Be cautious about including passwords in scripts.
147                 </para></listitem>
148                 </varlistentry>
150                 <varlistentry>
151                 <term>-R|--name-resolve &lt;name resolve order&gt;</term>
152                 <listitem><para>This option is used by the programs in the Samba
153                 suite to determine what naming services and in what order to resolve
154                 host names to IP addresses. The option takes a space-separated
155                 string of different name resolution options.</para>
157                 <para>The options are :"lmhosts", "host", "wins" and "bcast". They
158                 cause names to be resolved as follows:</para>
160                 <itemizedlist>
161                         <listitem><para><constant>lmhosts</constant>: Lookup an IP
162                         address in the Samba lmhosts file. If the line in lmhosts has
163                         no name type attached to the NetBIOS name (see
164                         the <citerefentry><refentrytitle>lmhosts</refentrytitle>
165                         <manvolnum>5</manvolnum></citerefentry> for details) then
166                         any name type matches for lookup.</para>
167                         </listitem>
169                         <listitem><para><constant>host</constant>: Do a standard host
170                         name to IP address resolution, using the system <filename>/etc/hosts
171                         </filename>, NIS, or DNS lookups. This method of name resolution
172                         is operating system dependent, for instance on IRIX or Solaris this
173                         may be controlled by the <filename>/etc/nsswitch.conf</filename>
174                         file).  Note that this method is only used if the NetBIOS name
175                         type being queried is the 0x20 (server) name type, otherwise
176                         it is ignored.</para>
177                         </listitem>
179                         <listitem><para><constant>wins</constant>: Query a name with
180                         the IP address listed in the <parameter>wins server</parameter>
181                         parameter.      If no WINS server has
182                         been specified this method will be ignored.</para>
183                         </listitem>
185                         <listitem><para><constant>bcast</constant>: Do a broadcast on
186                         each of the known local interfaces listed in the
187                         <parameter>interfaces</parameter>
188                         parameter. This is the least reliable of the name resolution
189                         methods as it depends on the target host being on a locally
190                         connected subnet.</para>
191                         </listitem>
192                 </itemizedlist>
194                 <para>If this parameter is not set then the name resolve order
195                 defined in the <citerefentry><refentrytitle>smb.conf</refentrytitle>
196                 <manvolnum>5</manvolnum></citerefentry> file parameter
197                 (name resolve order) will be used. </para>
199                 <para>The default order is lmhosts, host, wins, bcast and without
200                 this parameter or any entry in the <parameter>name resolve order
201                 </parameter> parameter of the <citerefentry><refentrytitle>smb.conf</refentrytitle>
202                 <manvolnum>5</manvolnum></citerefentry> file the name resolution
203                 methods will be attempted in this order. </para></listitem>
204                 </varlistentry>
207                 <varlistentry>
208                 <term>-M|--message NetBIOS name</term>
209                 <listitem><para>This options allows you to send messages, using
210                 the "WinPopup" protocol, to another computer. Once a connection is
211                 established you then type your message, pressing ^D (control-D) to
212                 end. </para>
214                 <para>If the receiving computer is running WinPopup the user will
215                 receive the message and probably a beep. If they are not running
216                 WinPopup the message will be lost, and no error message will
217                 occur. </para>
219                 <para>The message is also automatically truncated if the message
220                 is over 1600 bytes, as this is the limit of the protocol.
221                 </para>
223                 <para>
224                 One useful trick is to pipe the message through <command>smbclient</command>.
225                 For example: smbclient -M FRED &lt; mymessage.txt will send the
226                 message in the file <filename>mymessage.txt</filename> to the
227                 machine FRED.
228                 </para>
230                 <para>You may also find the <parameter>-U</parameter> and
231                 <parameter>-I</parameter> options useful, as they allow you to
232                 control the FROM and TO parts of the message. </para>
234                 <para>See the <parameter>message command</parameter> parameter in the <citerefentry><refentrytitle>smb.conf</refentrytitle>
235                 <manvolnum>5</manvolnum></citerefentry> for a description of how to handle incoming
236                 WinPopup messages in Samba. </para>
238                 <para><emphasis>Note</emphasis>: Copy WinPopup into the startup group
239                 on your WfWg PCs if you want them to always be able to receive
240                 messages. </para></listitem>
241                 </varlistentry>
243                 <varlistentry>
244                 <term>-p|--port port</term>
245                 <listitem><para>This number is the TCP port number that will be used
246                 when making connections to the server. The standard (well-known)
247                 TCP port number for an SMB/CIFS server is 139, which is the
248                 default. </para></listitem>
249                 </varlistentry>
251                 <varlistentry>
252                 <term>-g|--grepable</term>
253                 <listitem><para>This parameter provides combined with
254                 <parameter>-L</parameter> easy parseable output that allows processing
255                 with utilities such as grep and cut.
256                 </para></listitem>
257                 </varlistentry>
259                 <varlistentry>
260                 <term>-m|--max-protocol protocol</term>
261                 <listitem><para>This allows the user to select the
262                 highest SMB protocol level that smbclient will use to
263                 connect to the server. By default this is set to
264                 highest available SMB3 protocol version.
265                 To connect using SMB2 or SMB1 protocol, use the
266                 strings SMB2 or NT1 respectively. Note that to connect
267                 to a Windows 2012 server with encrypted transport selecting
268                 a max-protocol of SMB3 is required.
269                 </para></listitem>
270                 </varlistentry>
272                 <varlistentry>
273                 <term>-P|--machine-pass</term>
274                 <listitem><para>
275                 Make queries to the external server using the machine account of the local server.
276                 </para></listitem>
277                 </varlistentry>
279                 <varlistentry>
280                 <term>-I|--ip-address IP-address</term>
281                 <listitem><para><replaceable>IP address</replaceable> is the address of the server to connect to.
282                 It should be specified in standard "a.b.c.d" notation. </para>
284                 <para>Normally the client would attempt to locate a named
285                 SMB/CIFS server by looking it up via the NetBIOS name resolution
286                 mechanism described above in the <parameter>name resolve order</parameter>
287                 parameter above. Using this parameter will force the client
288                 to assume that the server is on the machine with the specified IP
289                 address and the NetBIOS name component of the resource being
290                 connected to will be ignored. </para>
292                 <para>There is no default for this parameter. If not supplied,
293                 it will be determined automatically by the client as described
294                 above. </para></listitem>
295                 </varlistentry>
297                 <varlistentry>
298                 <term>-E|--stderr</term>
299                 <listitem><para>This parameter causes the client to write messages
300                 to the standard error stream (stderr) rather than to the standard
301                 output stream. </para>
303                 <para>By default, the client writes messages to standard output
304                 - typically the user's tty. </para></listitem>
305                 </varlistentry>
307                 <varlistentry>
308                 <term>-L|--list</term>
309                 <listitem><para>This option allows you to look at what services
310                 are available on a server. You use it as <command>smbclient -L
311                 host</command> and a list should appear.  The <parameter>-I
312                 </parameter> option may be useful if your NetBIOS names don't
313                 match your TCP/IP DNS host names or if you are trying to reach a
314                 host on another network. </para></listitem>
315                 </varlistentry>
317                 <varlistentry>
318                 <term>-b|--send-buffer buffersize</term>
319                 <listitem><para>
320                 When sending or receiving files, smbclient uses an
321                 internal buffer sized by the maximum number of allowed requests
322                 to the connected server. This command allows this size to be set to any
323                 range between 0 (which means use the default server controlled size) bytes
324                 and 16776960 (0xFFFF00) bytes. Using the server controlled size is the
325                 most efficient as smbclient will pipeline as many simultaneous reads or
326                 writes needed to keep the server as busy as possible. Setting this to
327                 any other size will slow down the transfer. This can also be set
328                 using the <command>iosize</command> command inside smbclient.
329                 </para></listitem>
330                 </varlistentry>
332                 <varlistentry>
333                 <term>-B|--browse</term>
334                 <listitem><para>Browse SMB servers using DNS.</para>
335                 </listitem>
336                 </varlistentry>
338                 &stdarg.client.debug;
339                 &popt.common.samba;
340                 &popt.common.credentials;
341                 &popt.common.connection;
342                 &popt.autohelp;
344                 <varlistentry>
345                 <term>-t|--timeout &lt;timeout-seconds&gt;</term>
346                 <listitem><para>This allows the user to tune the default
347                 timeout used for each SMB request. The default setting is
348                 20 seconds. Increase it if requests to the server sometimes
349                 time out. This can happen when SMB3 encryption is selected
350                 and smbclient is overwhelming the server with requests.
351                 This can also be set using the <command>timeout</command>
352                 command inside smbclient.
353                 </para></listitem>
354                 </varlistentry>
356                 <varlistentry>
357                 <term>-T|--tar tar options</term>
358                 <listitem><para>smbclient may be used to create <command>tar(1)
359                 </command> compatible backups of all the files on an SMB/CIFS
360                 share. The secondary tar flags that can be given to this option
361                 are:</para>
363                 <itemizedlist>
364                         <listitem><para><parameter>c</parameter> - Create a tar
365                         backup archive on the local system.      Must be followed by
366                         the name of a tar file, tape device or "-" for standard
367                         output. If using standard output you must turn the log
368                         level to its lowest value -d0 to avoid corrupting your tar
369                         file. This flag is mutually exclusive with the
370                         <parameter>x</parameter> flag. </para></listitem>
372                         <listitem><para><parameter>n</parameter> - In
373                         combination with the <parameter>c</parameter>
374                         flag, do not actually create the archive,
375                         instead perform a dry run that attempts
376                         everything that involved in creation other than
377                         writing the file.</para></listitem>
379                         <listitem><para><parameter>x</parameter> - Extract (restore) a local
380                         tar file back to a share. Unless the -D option is given, the tar
381                         files will be restored from the top level of the share. Must be
382                         followed by the name of the tar file, device or "-" for standard
383                         input. Mutually exclusive with the <parameter>c</parameter> flag.
384                         Restored files have their creation times (mtime) set to the
385                         date saved in the tar file. Directories currently do not get
386                         their creation dates restored properly. </para></listitem>
388                         <listitem><para><parameter>I</parameter> - Include files and directories.
389                         Is the default behavior when filenames are specified above. Causes
390                         files to be included in an extract or create (and therefore
391                         everything else to be excluded). See example below.      Filename globbing
392                         works  in one of two ways.      See <parameter>r</parameter> below. </para></listitem>
394                         <listitem><para><parameter>X</parameter> - Exclude files and directories.
395                         Causes files to be excluded from an extract or create. See
396                         example below.  Filename globbing works in one of two ways.
397                         See <parameter>r</parameter> below. </para></listitem>
399                         <listitem><para><parameter>F</parameter> - File containing a list of files and directories.
400                         The <parameter>F</parameter> causes the name following the tarfile to
401                         create to be read as a filename that contains a list of files and directories to
402                         be included in an extract or create (and therefore everything else to be excluded).
403                         See example below. Filename globbing works in one of two ways.
404                         See <parameter>r</parameter> below.
405                         </para></listitem>
407                         <listitem><para><parameter>b</parameter> - Blocksize. Must be followed
408                         by a valid (greater than zero) blocksize.  Causes tar file to be
409                         written out in blocksize*TBLOCK (512 byte) blocks.
410                         </para></listitem>
412                         <listitem><para><parameter>g</parameter> - Incremental. Only back up
413                         files that have the archive bit set. Useful only with the
414                         <parameter>c</parameter> flag. </para></listitem>
416                         <listitem><para><parameter>v</parameter> - Verbose. Makes tar
417                         print out the files being processed. By default tar is not verbose.
418                         This is the same as tarmode verbose.
419                         </para></listitem>
421                         <listitem><para><parameter>r</parameter> - Use wildcard
422                         matching to include or exclude. Deprecated.
423                         </para></listitem>
425                         <listitem><para><parameter>N</parameter> - Newer than. Must be followed
426                         by the name of a file whose date is compared against files found
427                         on the share during a create. Only files newer than the file
428                         specified are backed up to the tar file. Useful only with the
429                         <parameter>c</parameter> flag. </para></listitem>
431                         <listitem><para><parameter>a</parameter> - Set archive bit. Causes the
432                         archive bit to be reset when a file is backed up. Useful with the
433                         <parameter>g</parameter> and <parameter>c</parameter> flags.
434                         </para></listitem>
435                 </itemizedlist>
437                 <para><emphasis>Tar Long File Names</emphasis></para>
439                 <para><command>smbclient</command>'s tar option now supports long
440                 file names both on backup and restore. However, the full path
441                 name of the file must be less than 1024 bytes.  Also, when
442                 a tar archive is created, <command>smbclient</command>'s tar option places all
443                 files in the archive with relative names, not absolute names.
444                 </para>
446                 <para><emphasis>Tar Filenames</emphasis></para>
448                 <para>All file names can be given as DOS path names (with '\\'
449                 as the component separator) or as UNIX path names (with '/' as
450                 the component separator). </para>
452                 <para><emphasis>Examples</emphasis></para>
454                 <para>Restore from tar file <filename>backup.tar</filename> into myshare on mypc
455                 (no password on share). </para>
457                 <para><command>smbclient //mypc/myshare "" -N -Tx backup.tar
458                 </command></para>
460                 <para>Restore everything except <filename>users/docs</filename>
461                 </para>
463                 <para><command>smbclient //mypc/myshare "" -N -TXx backup.tar
464                 users/docs</command></para>
466                 <para>Create a tar file of the files beneath <filename>
467                 users/docs</filename>. </para>
469                 <para><command>smbclient //mypc/myshare "" -N -Tc
470                 backup.tar users/docs </command></para>
472                 <para>Create the same tar file as above, but now use
473                 a DOS path name. </para>
475                 <para><command>smbclient //mypc/myshare "" -N -Tc backup.tar
476                 users\edocs </command></para>
478                 <para>Create a tar file of the files listed in the file <filename>tarlist</filename>.</para>
480                 <para><command>smbclient //mypc/myshare "" -N -TcF
481                 backup.tar tarlist</command></para>
483                 <para>Create a tar file of all the files and directories in
484                 the share. </para>
486                 <para><command>smbclient //mypc/myshare "" -N -Tc backup.tar *
487                 </command></para>
488                 </listitem>
489                 </varlistentry>
491                 <varlistentry>
492                 <term>-D|--directory initial directory</term>
493                 <listitem><para>Change to initial directory before starting. Probably
494                 only of any use with the tar -T option. </para></listitem>
495                 </varlistentry>
497                 <varlistentry>
498                 <term>-c|--command command string</term>
499                 <listitem><para>command string is a semicolon-separated list of
500                 commands to be executed instead of prompting from stdin. <parameter>
501                 -N</parameter> is implied by <parameter>-c</parameter>.</para>
503                 <para>This is particularly useful in scripts and for printing stdin
504                 to the server, e.g. <command>-c 'print -'</command>. </para></listitem>
505                 </varlistentry>
507         </variablelist>
508 </refsect1>
511 <refsect1>
512         <title>OPERATIONS</title>
514         <para>Once the client is running, the user is presented with
515         a prompt : </para>
517         <para><prompt>smb:\&gt; </prompt></para>
519         <para>The backslash ("\\") indicates the current working directory
520         on the server, and will change if the current working directory
521         is changed. </para>
523         <para>The prompt indicates that the client is ready and waiting to
524         carry out a user command. Each command is a single word, optionally
525         followed by parameters specific to that command. Command and parameters
526         are space-delimited unless these notes specifically
527         state otherwise. All commands are case-insensitive.      Parameters to
528         commands may or may not be case sensitive, depending on the command.
529         </para>
531         <para>You can specify file names which have spaces in them by quoting
532         the name with double quotes, for example "a long file name". </para>
534         <para>Parameters shown in square brackets (e.g., "[parameter]") are
535         optional.  If not given, the command will use suitable defaults. Parameters
536         shown in angle brackets (e.g., "&lt;parameter&gt;") are required.
537         </para>
540         <para>Note that all commands operating on the server are actually
541         performed by issuing a request to the server. Thus the behavior may
542         vary from server to server, depending on how the server was implemented.
543         </para>
545         <para>The commands available are given here in alphabetical order. </para>
547         <variablelist>
548                 <varlistentry>
549                 <term>? [command]</term>
550                 <listitem><para>If <replaceable>command</replaceable> is specified, the ? command will display
551                 a brief informative message about the specified command.  If no
552                 command is specified, a list of available commands will
553                 be displayed. </para></listitem>
554                 </varlistentry>
556                 <varlistentry>
557                 <term>! [shell command]</term>
558                 <listitem><para>If <replaceable>shell command</replaceable> is specified, the !
559                 command will execute a shell locally and run the specified shell
560                 command. If no command is specified, a local shell will be run.
561                 </para></listitem>
562                 </varlistentry>
564                 <varlistentry>
565                 <term>allinfo file</term>
566                 <listitem><para>The client will request that the server return
567                 all known information about a file or directory (including streams).
568                 </para></listitem>
569                 </varlistentry>
571                 <varlistentry>
572                 <term>altname file</term>
573                 <listitem><para>The client will request that the server return
574                 the "alternate" name (the 8.3 name) for a file or directory.
575                 </para></listitem>
576                 </varlistentry>
578                 <varlistentry>
579                 <term>archive &lt;number&gt;</term>
580                 <listitem><para>Sets the archive level when operating on files.
581                 0 means ignore the archive bit, 1 means only operate on files with this bit set,
582                 2 means only operate on files with this bit set and reset it after operation,
583                 3 means operate on all files and reset it after operation. The default is 0.
584                 </para></listitem>
585                 </varlistentry>
587                 <varlistentry>
588                 <term>backup</term>
589                 <listitem><para>Toggle the state of the "backup intent" flag
590                 sent to the server on directory listings and file opens. If
591                 the "backup intent" flag is true, the server will try and
592                 bypass some file system checks if the user has been granted
593                 SE_BACKUP or SE_RESTORE privileges. This state is useful when
594                 performing a backup or restore operation.
595                 </para></listitem>
596                 </varlistentry>
598                 <varlistentry>
599                 <term>blocksize &lt;number&gt;</term>
600                 <listitem><para>Sets the blocksize parameter for a tar operation. The default is 20.
601                 Causes tar file to be written out in blocksize*TBLOCK (normally 512 byte) units.
602                 </para></listitem>
603                 </varlistentry>
605                 <varlistentry>
606                 <term>cancel jobid0 [jobid1] ... [jobidN]</term>
607                 <listitem><para>The client will request that the server cancel
608                 the printjobs identified by the given numeric print job ids.
609                 </para></listitem>
610                 </varlistentry>
612                 <varlistentry>
613                 <term>case_sensitive</term>
614                 <listitem><para>Toggles the setting of the flag in SMB packets that
615                 tells the server to treat filenames as case sensitive. Set to OFF by
616                 default (tells file server to treat filenames as case insensitive). Only
617                 currently affects Samba 3.0.5 and above file servers with the case sensitive
618                 parameter set to auto in the smb.conf.
619                 </para></listitem>
620                 </varlistentry>
622                 <varlistentry>
623                 <term>cd &lt;directory name&gt;</term>
624                 <listitem><para>If "directory name" is specified, the current
625                 working directory on the server will be changed to the directory
626                 specified. This operation will fail if for any reason the specified
627                 directory is inaccessible. </para>
629                 <para>If no directory name is specified, the current working
630                 directory on the server will be reported. </para></listitem>
631                 </varlistentry>
633                 <varlistentry>
634                 <term>chmod file mode in octal</term>
635                 <listitem><para>This command depends on the server supporting the CIFS
636                 UNIX extensions and will fail if the server does not. The client requests that the server
637                 change the UNIX permissions to the given octal mode, in standard UNIX format.
638                 </para></listitem>
639                 </varlistentry>
641                 <varlistentry>
642                 <term>chown file uid gid</term>
643                 <listitem><para>This command depends on the server supporting the CIFS
644                 UNIX extensions and will fail if the server does not. The client requests that the server
645                 change the UNIX user and group ownership to the given decimal values. Note there is
646                 currently no way to remotely look up the UNIX uid and gid values for a given name.
647                 This may be addressed in future versions of the CIFS UNIX extensions.
648                 </para></listitem>
649                 </varlistentry>
651                 <varlistentry>
652                 <term>close &lt;fileid&gt;</term>
653                 <listitem><para>Closes a file explicitly opened by the open command. Used for
654                 internal Samba testing purposes.
655                 </para></listitem>
656                 </varlistentry>
658                 <varlistentry>
659                 <term>del &lt;mask&gt;</term>
660                 <listitem><para>The client will request that the server attempt
661                 to delete all files matching <replaceable>mask</replaceable> from the current working
662                 directory on the server. </para></listitem>
663                 </varlistentry>
665                 <varlistentry>
666                 <term>deltree &lt;mask&gt;</term>
667                 <listitem><para>The client will request that the server attempt
668                 to delete all files and directories matching <replaceable>mask</replaceable> from the current working
669                 directory on the server. Note this will recursively delete files and directories within
670                 the directories selected even without the recurse command being set. If any of the delete
671                 requests fail the command will stop processing at that point, leaving files and directories
672                 not yet processed untouched. This is by design.</para></listitem>
673                 </varlistentry>
675                 <varlistentry>
676                 <term>dir &lt;mask&gt;</term>
677                 <listitem><para>A list of the files matching <replaceable>mask</replaceable> in the current
678                 working directory on the server will be retrieved from the server
679                 and displayed. </para></listitem>
680                 </varlistentry>
682                 <varlistentry>
683                 <term>du &lt;filename&gt;</term>
684                 <listitem><para>Does a directory listing and then prints out the current disk usage and free space on a share.
685                 </para></listitem>
686                 </varlistentry>
688                 <varlistentry>
689                 <term>echo &lt;number&gt; &lt;data&gt;</term>
690                 <listitem><para>Does an SMBecho request to ping the server. Used for internal Samba testing purposes.
691                 </para></listitem>
692                 </varlistentry>
694                 <varlistentry>
695                 <term>exit</term>
696                 <listitem><para>Terminate the connection with the server and exit
697                 from the program. </para></listitem>
698                 </varlistentry>
700                 <varlistentry>
701                 <term>get &lt;remote file name&gt; [local file name]</term>
702                 <listitem><para>Copy the file called <filename>remote file name</filename> from
703                 the server to the machine running the client. If specified, name
704                 the local copy <filename>local file name</filename>.  Note that all transfers in
705                 <command>smbclient</command> are binary. See also the
706                 lowercase command. </para></listitem>
707                 </varlistentry>
709                 <varlistentry>
710                 <term>getfacl &lt;filename&gt;</term>
711                 <listitem><para>Requires the server support the UNIX extensions. Requests and prints
712                 the POSIX ACL on a file.
713                 </para></listitem>
714                 </varlistentry>
716                 <varlistentry>
717                 <term>hardlink &lt;src&gt; &lt;dest&gt;</term>
718                 <listitem><para>Creates a hardlink on the server using Windows CIFS semantics.
719                 </para></listitem>
720                 </varlistentry>
722                 <varlistentry>
723                 <term>help [command]</term>
724                 <listitem><para>See the ? command above. </para></listitem>
725                 </varlistentry>
727                 <varlistentry>
728                 <term>history</term> <listitem><para>Displays the command history.</para></listitem>
729                 </varlistentry>
731                 <varlistentry>
732                 <term>iosize &lt;bytes&gt;</term>
733                 <listitem><para>
734                 When sending or receiving files, smbclient uses an
735                 internal buffer sized by the maximum number of allowed requests
736                 to the connected server. This command allows this size to be set to any
737                 range between 0 (which means use the default server controlled size) bytes
738                 and 16776960 (0xFFFF00) bytes. Using the server controlled size is the
739                 most efficient as smbclient will pipeline as many simultaneous reads or
740                 writes needed to keep the server as busy as possible. Setting this to
741                 any other size will slow down the transfer.
742                 </para></listitem>
743                 </varlistentry>
745                 <varlistentry>
746                 <term>lcd [directory name]</term>
747                 <listitem><para>If <replaceable>directory name</replaceable> is specified, the current
748                 working directory on the local machine will be changed to
749                 the directory specified. This operation will fail if for any
750                 reason the specified directory is inaccessible. </para>
752                 <para>If no directory name is specified, the name of the
753                 current working directory on the local machine will be reported.
754                 </para></listitem>
755                 </varlistentry>
757                 <varlistentry>
758                 <term>link target linkname</term>
759                 <listitem><para>This command depends on the server supporting the CIFS
760                 UNIX extensions and will fail if the server does not. The client requests that the server
761                 create a hard link between the linkname and target files. The linkname file
762                 must not exist.
763                 </para></listitem>
764                 </varlistentry>
766                 <varlistentry>
767                 <term>listconnect</term>
768                 <listitem><para>Show the current connections held for DFS purposes.
769                 </para></listitem>
770                 </varlistentry>
772                 <varlistentry>
773                 <term>lock &lt;filenum&gt; &lt;r|w&gt; &lt;hex-start&gt; &lt;hex-len&gt;</term>
774                 <listitem><para>This command depends on the server supporting the CIFS
775                 UNIX extensions and will fail if the server does not. Tries to set a POSIX
776                 fcntl lock of the given type on the given range. Used for internal Samba testing purposes.
777                 </para></listitem>
778                 </varlistentry>
780                 <varlistentry>
781                 <term>logon &lt;username&gt; &lt;password&gt;</term>
782                 <listitem><para>Establishes a new vuid for this session by logging on again.
783                 Replaces the current vuid. Prints out the new vuid. Used for internal Samba testing purposes.
784                 </para></listitem>
785                 </varlistentry>
787                 <varlistentry>
788                 <term>logoff</term>
789                 <listitem><para>Logs the user off the server, closing the session.
790                 Used for internal Samba testing purposes.
791                 </para></listitem>
792                 </varlistentry>
794                 <varlistentry>
795                 <term>lowercase</term>
796                 <listitem><para>Toggle lowercasing of filenames for the get and
797                 mget commands.
798                 </para>
800                 <para>When lowercasing is toggled ON, local filenames are converted
801                 to lowercase when using the get and mget commands. This is
802                 often useful when copying (say) MSDOS files from a server, because
803                 lowercase filenames are the norm on UNIX systems. </para></listitem>
804                 </varlistentry>
806                 <varlistentry>
807                 <term>ls &lt;mask&gt;</term>
808                 <listitem><para>See the dir command above. </para></listitem>
809                 </varlistentry>
811                 <varlistentry>
812                 <term>mask &lt;mask&gt;</term>
813                 <listitem><para>This command allows the user to set up a mask
814                 which will be used during recursive operation of the mget and
815                 mput commands. </para>
817                 <para>The masks specified to the mget and mput commands act as
818                 filters for directories rather than files when recursion is
819                 toggled ON. </para>
821                 <para>The mask specified with the mask command is necessary
822                 to filter files within those directories. For example, if the
823                 mask specified in an mget command is "source*" and the mask
824                 specified with the mask command is "*.c" and recursion is
825                 toggled ON, the mget command will retrieve all files matching
826                 "*.c" in all directories below and including all directories
827                 matching "source*" in the current working directory. </para>
829                 <para>Note that the value for mask defaults to blank (equivalent
830                 to "*") and remains so until the mask command is used to change it.
831                 It retains the most recently specified value indefinitely. To
832                 avoid unexpected results it would be wise to change the value of
833                 mask back to "*" after using the mget or mput commands. </para></listitem>
834                 </varlistentry>
836                 <varlistentry>
837                 <term>md &lt;directory name&gt;</term>
838                 <listitem><para>See the mkdir command. </para></listitem>
839                 </varlistentry>
841                 <varlistentry>
842                 <term>mget &lt;mask&gt;</term>
843                 <listitem><para>Copy all files matching <replaceable>mask</replaceable> from the server to
844                 the machine running the client. </para>
846                 <para>Note that <replaceable>mask</replaceable> is interpreted differently during recursive
847                 operation and non-recursive operation - refer to the recurse and
848                 mask commands for more information. Note that all transfers in
849                 <command>smbclient</command> are binary. See also the lowercase command. </para></listitem>
850                 </varlistentry>
852                 <varlistentry>
853                 <term>mkdir &lt;directory name&gt;</term>
854                 <listitem><para>Create a new directory on the server (user access
855                 privileges permitting) with the specified name. </para></listitem>
856                 </varlistentry>
858                 <varlistentry>
859                 <term>more &lt;file name&gt;</term>
860                 <listitem><para>Fetch a remote file and view it with the contents
861                 of your PAGER environment variable.
862                 </para></listitem>
863                 </varlistentry>
865                 <varlistentry>
866                 <term>mput &lt;mask&gt;</term>
867                 <listitem><para>Copy all files matching <replaceable>mask</replaceable> in the current working
868                 directory on the local machine to the current working directory on
869                 the server. </para>
871                 <para>Note that <replaceable>mask</replaceable> is interpreted differently during recursive
872                 operation and non-recursive operation - refer to the recurse and mask
873                 commands for more information. Note that all transfers in <command>smbclient</command>
874                 are binary. </para></listitem>
875                 </varlistentry>
877                 <varlistentry>
878                 <term>notify &lt;dir name&gt;</term>
879                 <listitem><para>Query a directory for change
880                 notifications. This command issues a recursive
881                 filechangenotify call for all possible changes. As
882                 changes come in will print one line per change. See
883                 <ulink url="https://msdn.microsoft.com/en-us/library/dn392331.aspx">https://msdn.microsoft.com/en-us/library/dn392331.aspx</ulink>
884                 for a description of the action numbers that this
885                 command prints.</para>
886                 <para>This command never ends, it waits for event
887                 indefinitely.
888                 </para></listitem>
889                 </varlistentry>
891                 <varlistentry>
892                 <term>posix</term>
893                 <listitem><para>Query the remote server to see if it supports the CIFS UNIX
894                 extensions and prints out the list of capabilities supported. If so, turn
895                 on POSIX pathname processing and large file read/writes (if available),.
896                 </para></listitem>
897                 </varlistentry>
899                 <varlistentry>
900                 <term>posix_encrypt &lt;domain&gt; &lt;username&gt; &lt;password&gt;</term>
901                 <listitem><para>This command depends on the server supporting the CIFS
902                 UNIX extensions and will fail if the server does not. Attempt to negotiate
903                 SMB encryption on this connection. If smbclient connected with kerberos
904                 credentials (-k) the arguments to this command are ignored and the kerberos
905                 credentials are used to negotiate GSSAPI signing and sealing instead. See
906                 also the -e option to smbclient to force encryption on initial connection.
907                 This command is new with Samba 3.2.
908                 </para></listitem>
909                 </varlistentry>
911                 <varlistentry>
912                 <term>posix_open &lt;filename&gt; &lt;octal mode&gt;</term>
913                 <listitem><para>This command depends on the server supporting the CIFS
914                 UNIX extensions and will fail if the server does not. Opens a remote file
915                 using the CIFS UNIX extensions and prints a fileid. Used for internal Samba
916                 testing purposes.
917                 </para></listitem>
918                 </varlistentry>
920                 <varlistentry>
921                 <term>posix_mkdir &lt;directoryname&gt; &lt;octal mode&gt;</term>
922                 <listitem><para>This command depends on the server supporting the CIFS
923                 UNIX extensions and will fail if the server does not. Creates a remote directory
924                 using the CIFS UNIX extensions with the given mode.
925                 </para></listitem>
926                 </varlistentry>
928                 <varlistentry>
929                 <term>posix_rmdir &lt;directoryname&gt;</term>
930                 <listitem><para>This command depends on the server supporting the CIFS
931                 UNIX extensions and will fail if the server does not. Deletes a remote directory
932                 using the CIFS UNIX extensions.
933                 </para></listitem>
934                 </varlistentry>
936                 <varlistentry>
937                 <term>posix_unlink &lt;filename&gt;</term>
938                 <listitem><para>This command depends on the server supporting the CIFS
939                 UNIX extensions and will fail if the server does not. Deletes a remote file
940                 using the CIFS UNIX extensions.
941                 </para></listitem>
942                 </varlistentry>
944                 <varlistentry>
945                 <term>posix_whoami</term>
946                 <listitem><para>Query the remote server for the user token using the CIFS UNIX
947                 extensions WHOAMI call. Prints out the guest status, user, group, group list and
948                 sid list that the remote server is using on behalf of the logged on user.
949                 </para></listitem>
950                 </varlistentry>
952                 <varlistentry>
953                 <term>print &lt;file name&gt;</term>
954                 <listitem><para>Print the specified file from the local machine
955                 through a printable service on the server. </para></listitem>
956                 </varlistentry>
958                 <varlistentry>
959                 <term>prompt</term>
960                 <listitem><para>Toggle prompting for filenames during operation
961                 of the mget and mput commands. </para>
963                 <para>When toggled ON, the user will be prompted to confirm
964                 the transfer of each file during these commands. When toggled
965                 OFF, all specified files will be transferred without prompting.
966                 </para></listitem>
967                 </varlistentry>
969                 <varlistentry>
970                 <term>put &lt;local file name&gt; [remote file name]</term>
971                 <listitem><para>Copy the file called <filename>local file name</filename> from the
972                 machine running the client to the server. If specified,
973                 name the remote copy <filename>remote file name</filename>. Note that all transfers
974                 in <command>smbclient</command> are binary. See also the lowercase command.
975                 </para></listitem>
976                 </varlistentry>
978                 <varlistentry>
979                 <term>queue</term>
980                 <listitem><para>Displays the print queue, showing the job id,
981                 name, size and current status. </para></listitem>
982                 </varlistentry>
984                 <varlistentry>
985                 <term>quit</term>
986                 <listitem><para>See the exit command. </para></listitem>
987                 </varlistentry>
989                 <varlistentry>
990                 <term>readlink symlinkname</term>
991                 <listitem><para>This command depends on the server supporting the CIFS
992                 UNIX extensions and will fail if the server does not. Print
993                 the value of the symlink "symlinkname".
994                 </para></listitem>
995                 </varlistentry>
997                 <varlistentry>
998                 <term>rd &lt;directory name&gt;</term>
999                 <listitem><para>See the rmdir command. </para></listitem>
1000                 </varlistentry>
1002                 <varlistentry>
1003                 <term>recurse</term>
1004                 <listitem><para>Toggle directory recursion for the commands mget
1005                 and mput. </para>
1007                 <para>When toggled ON, these commands will process all directories
1008                 in the source directory (i.e., the directory they are copying
1009                 from ) and will recurse into any that match the mask specified
1010                 to the command. Only files that match the mask specified using
1011                 the mask command will be retrieved. See also the mask command.
1012                 </para>
1014                 <para>When recursion is toggled OFF, only files from the current
1015                 working directory on the source machine that match the mask specified
1016                 to the mget or mput commands will be copied, and any mask specified
1017                 using the mask command will be ignored. </para></listitem>
1018                 </varlistentry>
1020                 <varlistentry>
1021                 <term>rename &lt;old filename&gt; &lt;new filename&gt; [-f]</term>
1022                 <listitem><para>Rename files in the current working directory on the
1023                 server from <replaceable>old filename</replaceable> to
1024                 <replaceable>new filename</replaceable>. The optional
1025                 -f switch allows for superseding the destination file,
1026                 if it exists. This is supported by NT1 protocol dialect
1027                 and SMB2 protocol family.</para></listitem>
1028                 </varlistentry>
1030                 <varlistentry>
1031                 <term>rm &lt;mask&gt;</term>
1032                 <listitem><para>Remove all files matching <replaceable>mask</replaceable> from the current
1033                 working directory on the server. </para></listitem>
1034                 </varlistentry>
1036                 <varlistentry>
1037                 <term>rmdir &lt;directory name&gt;</term>
1038                 <listitem><para>Remove the specified directory (user access
1039                 privileges permitting) from the server. </para></listitem>
1040                 </varlistentry>
1042                 <varlistentry>
1043                 <term>scopy &lt;source filename&gt; &lt;destination filename&gt;</term>
1044                 <listitem><para>Attempt to copy a file on the server using the
1045                 most efficient server-side copy calls. Falls back to using
1046                 read then write if server doesn't support server-side copy.
1047                 </para></listitem>
1048                 </varlistentry>
1050                 <varlistentry>
1051                 <term>setmode &lt;filename&gt; &lt;perm=[+|\-]rsha&gt;</term>
1052                 <listitem><para>A version of the DOS attrib command to set
1053                 file permissions. For example: </para>
1055                 <para><command>setmode myfile +r </command></para>
1057                 <para>would make myfile read only. </para></listitem>
1058                 </varlistentry>
1060                 <varlistentry>
1061                 <term>showconnect</term>
1062                 <listitem><para>Show the currently active connection held for DFS purposes.
1063                 </para></listitem>
1064                 </varlistentry>
1066                 <varlistentry>
1067                 <term>stat file</term>
1068                 <listitem><para>This command depends on the server supporting the CIFS
1069                 UNIX extensions and will fail if the server does not. The client requests the
1070                 UNIX basic info level and prints out the same info that the Linux stat command
1071                 would about the file. This includes the size, blocks used on disk, file type,
1072                 permissions, inode number, number of links and finally the three timestamps
1073                 (access, modify and change). If the file is a special file (symlink, character or
1074                 block device, fifo or socket) then extra information may also be printed.
1075                 </para></listitem>
1076                 </varlistentry>
1078                 <varlistentry>
1079                 <term>symlink target linkname</term>
1080                 <listitem><para>This command depends on the server supporting the CIFS
1081                 UNIX extensions and will fail if the server does not. The client requests that the server
1082                 create a symbolic hard link between the target and linkname files. The linkname file
1083                 must not exist. Note that the server will not create a link to any path that lies
1084                 outside the currently connected share. This is enforced by the Samba server.
1085                 </para></listitem>
1086                 </varlistentry>
1088                 <varlistentry>
1089                 <term>tar &lt;c|x&gt;[IXbgNa]</term>
1090                 <listitem><para>Performs a tar operation - see the
1091                 <parameter>-T</parameter> command line option above. Behavior
1092                 may be affected by the tarmode command (see below). Using g
1093                 (incremental) and N (newer) will affect tarmode settings. Note
1094                 that using the "-" option with tar x may not work - use the
1095                 command line option instead.</para></listitem>
1096                 </varlistentry>
1098                 <varlistentry>
1099                 <term>blocksize &lt;blocksize&gt;</term>
1100                 <listitem><para>Blocksize. Must be followed by a valid (greater
1101                 than zero) blocksize. Causes tar file to be written out in
1102                 <replaceable>blocksize</replaceable>*TBLOCK (512 byte) blocks. </para></listitem>
1103                 </varlistentry>
1105                 <varlistentry>
1106                 <term>tarmode &lt;full|inc|reset|noreset|system|nosystem|hidden|nohidden|verbose|noverbose&gt;</term>
1107                 <listitem><para>Changes tar's behavior with regard to DOS
1108                 attributes. There are 4 modes which can be turned on or
1109                 off.</para>
1111                 <para>Incremental mode (default off). When off (using
1112                 <command>full</command>) tar will back up everything
1113                 regardless of the <emphasis>archive</emphasis> bit
1114                 setting. When on (using <command>inc</command>), tar will only
1115                 back up files with the archive bit set.</para>
1117                 <para>Reset mode (default off). When on (using
1118                 <command>reset</command>), tar will remove the archive bit on
1119                 all files it backs up (implies read/write share). Use
1120                 <command>noreset</command> to turn off.</para>
1122                 <para>System mode (default on). When off, tar will not backup
1123                 system files. Use <command>nosystem</command> to turn off.</para>
1125                 <para>Hidden mode (default on). When off, tar will not backup
1126                 hidden files. Use <command>nohidden</command> to turn off.</para>
1127                 </listitem>
1128                 </varlistentry>
1130                 <varlistentry>
1131                 <term>timeout &lt;per-operation timeout in seconds&gt;</term>
1132                 <listitem><para>This allows the user to tune the default
1133                 timeout used for each SMB request. The default setting is
1134                 20 seconds. Increase it if requests to the server sometimes
1135                 time out. This can happen when SMB3 encryption is selected
1136                 and smbclient is overwhelming the server with requests.
1137                 </para></listitem>
1138                 </varlistentry>
1140                 <varlistentry>
1141                 <term>unlock &lt;filenum&gt; &lt;hex-start&gt; &lt;hex-len&gt;</term>
1142                 <listitem><para>This command depends on the server supporting the CIFS
1143                 UNIX extensions and will fail if the server does not. Tries to unlock a POSIX
1144                 fcntl lock on the given range. Used for internal Samba testing purposes.
1145                 </para></listitem>
1146                 </varlistentry>
1148                 <varlistentry>
1149                 <term>volume</term>
1150                 <listitem><para>Prints the current volume name of the share.
1151                 </para></listitem>
1152                 </varlistentry>
1154                 <varlistentry>
1155                 <term>vuid &lt;number&gt;</term>
1156                 <listitem><para>Changes the currently used vuid in the protocol to
1157                 the given arbitrary number. Without an argument prints out the current
1158                 vuid being used. Used for internal Samba testing purposes.
1159                 </para></listitem>
1160                 </varlistentry>
1162                 <varlistentry>
1163                 <term>tcon &lt;sharename&gt;</term>
1164                 <listitem><para>Establishes a new tree connect (connection to a share).
1165                 Replaces the current tree connect. Prints the new tid (tree id).
1166                 Used for internal Samba testing purposes.
1167                 </para></listitem>
1168                 </varlistentry>
1170                 <varlistentry>
1171                 <term>tdis</term>
1172                 <listitem><para>Close the current share connection (tree disconnect).
1173                 Used for internal Samba testing purposes.
1174                 </para></listitem>
1175                 </varlistentry>
1177                 <varlistentry>
1178                 <term>tid &lt;number&gt;</term>
1179                 <listitem><para>Changes the current tree id (tid) in the
1180                 protocol to a new arbitrary number. Without an argument, it
1181                 prints out the tid currently used.
1182                 Used for internal Samba testing purposes.
1183                 </para></listitem>
1184                 </varlistentry>
1186                 <varlistentry>
1187                 <term>utimes &lt;filename&gt; &lt;create time&gt; &lt;access time&gt; &lt;write time&gt; &lt;
1188                 change time&gt;</term>
1189                 <listitem><para>Changes the timestamps on a file by name.
1190                 Times should be specified in the format [YY]YY:MM:DD-HH:MM:SS or -1 for no change.
1191                 </para></listitem>
1192                 </varlistentry>
1194         </variablelist>
1195 </refsect1>
1197 <refsect1>
1198         <title>NOTES</title>
1200         <para>Some servers are fussy about the case of supplied usernames,
1201         passwords, share names (AKA service names) and machine names.
1202         If you fail to connect try giving all parameters in uppercase.
1203         </para>
1205         <para>It is often necessary to use the -n option when connecting
1206         to some types of servers. For example OS/2 LanManager insists
1207         on a valid NetBIOS name being used, so you need to supply a valid
1208         name that would be known to the server.</para>
1210         <para>smbclient supports long file names where the server
1211         supports the LANMAN2 protocol or above. </para>
1212 </refsect1>
1214 <refsect1>
1215         <title>ENVIRONMENT VARIABLES</title>
1217         <para>The variable <envar>USER</envar> may contain the
1218         username of the person  using the client. This information is
1219         used only if the protocol  level is high enough to support
1220         session-level passwords.</para>
1223         <para>The variable <envar>PASSWD</envar> may contain
1224         the password of the person using the client.  This information is
1225         used only if the protocol level is high enough to support
1226         session-level passwords. </para>
1227 </refsect1>
1230 <refsect1>
1231         <title>INSTALLATION</title>
1233         <para>The location of the client program is a matter for
1234         individual system administrators. The following are thus
1235         suggestions only. </para>
1237         <para>It is recommended that the smbclient software be installed
1238         in the <filename>/usr/local/samba/bin/</filename> or <filename>
1239         /usr/samba/bin/</filename> directory, this directory readable
1240         by all, writeable only by root. The client program itself should
1241         be executable by all. The client should <emphasis>NOT</emphasis> be
1242         setuid or setgid! </para>
1244         <para>The client log files should be put in a directory readable
1245         and writeable only by the user. </para>
1247         <para>To test the client, you will need to know the name of a
1248         running SMB/CIFS server. It is possible to run <citerefentry><refentrytitle>smbd</refentrytitle>
1249         <manvolnum>8</manvolnum></citerefentry> as an ordinary user - running that server as a daemon
1250         on a user-accessible port (typically any port number over 1024)
1251         would provide a suitable test server. </para>
1252 </refsect1>
1255 <refsect1>
1256         <title>DIAGNOSTICS</title>
1258         <para>Most diagnostics issued by the client are logged in a
1259         specified log file. The log file name is specified at compile time,
1260         but may be overridden on the command line. </para>
1262         <para>The number and nature of diagnostics available depends
1263         on the debug level used by the client. If you have problems,
1264         set the debug level to 3 and peruse the log files. </para>
1265 </refsect1>
1268 <refsect1>
1269         <title>VERSION</title>
1271         <para>This man page is part of version &doc.version; of the Samba suite.</para>
1272 </refsect1>
1275 <refsect1>
1276         <title>AUTHOR</title>
1278         <para>The original Samba software and related utilities
1279         were created by Andrew Tridgell. Samba is now developed
1280         by the Samba Team as an Open Source project similar
1281         to the way the Linux kernel is developed.</para>
1282 </refsect1>
1284 </refentry>