Ignore:
Timestamp:
May 23, 2008, 6:56:41 AM (17 years ago)
Author:
Paul Smedley
Message:

Update source to 3.0.29

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/docs/htmldocs/manpages/smbclient.1.html

    r44 r134  
    1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>smbclient</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.71.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="smbclient.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>smbclient &#8212; ftp-like client to access SMB/CIFS resources
    2         on servers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="literal">smbclient</code> [-b &lt;buffer size&gt;] [-d debuglevel] [-L &lt;netbios name&gt;] [-U username] [-I destinationIP] [-M &lt;netbios name&gt;] [-m maxprotocol] [-A authfile] [-N] [-i scope] [-O &lt;socket options&gt;] [-p port] [-R &lt;name resolve order&gt;] [-s &lt;smb config file&gt;] [-k] [-P] [-c &lt;command&gt;]</p></div><div class="cmdsynopsis"><p><code class="literal">smbclient</code> {servicename} [password] [-b &lt;buffer size&gt;] [-d debuglevel] [-D Directory] [-U username] [-W workgroup] [-M &lt;netbios name&gt;] [-m maxprotocol] [-A authfile] [-N] [-l logdir] [-I destinationIP] [-E] [-c &lt;command string&gt;] [-i scope] [-O &lt;socket options&gt;] [-p port] [-R &lt;name resolve order&gt;] [-s &lt;smb config file&gt;] [-T&lt;c|x&gt;IXFqgbNan] [-k]</p></div></div><div class="refsect1" lang="en"><a name="id260125"></a><h2>DESCRIPTION</h2><p>This tool is part of the <a href="samba.7.html"><span class="citerefentry"><span class="refentrytitle">samba</span>(7)</span></a> suite.</p><p><code class="literal">smbclient</code> is a client that can
     1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>smbclient</title><link rel="stylesheet" href="../samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="smbclient.1"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>smbclient &#8212; ftp-like client to access SMB/CIFS resources
     2        on servers</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="literal">smbclient</code> [-b &lt;buffer size&gt;] [-d debuglevel] [-e] [-L &lt;netbios name&gt;] [-U username] [-I destinationIP] [-M &lt;netbios name&gt;] [-m maxprotocol] [-A authfile] [-N] [-i scope] [-O &lt;socket options&gt;] [-p port] [-R &lt;name resolve order&gt;] [-s &lt;smb config file&gt;] [-k] [-P] [-c &lt;command&gt;]</p></div><div class="cmdsynopsis"><p><code class="literal">smbclient</code> {servicename} [password] [-b &lt;buffer size&gt;] [-d debuglevel] [-e] [-D Directory] [-U username] [-W workgroup] [-M &lt;netbios name&gt;] [-m maxprotocol] [-A authfile] [-N] [-l log-basename] [-I destinationIP] [-E] [-c &lt;command string&gt;] [-i scope] [-O &lt;socket options&gt;] [-p port] [-R &lt;name resolve order&gt;] [-s &lt;smb config file&gt;] [-T&lt;c|x&gt;IXFqgbNan] [-k]</p></div></div><div class="refsect1" lang="en"><a name="id283022"></a><h2>DESCRIPTION</h2><p>This tool is part of the <a class="citerefentry" href="samba.7.html"><span class="citerefentry"><span class="refentrytitle">samba</span>(7)</span></a> suite.</p><p><code class="literal">smbclient</code> is a client that can
    33        'talk' to an SMB/CIFS server. It offers an interface
    4         similar to that of the ftp program (see <a href="ftp.1.html"><span class="citerefentry"><span class="refentrytitle">ftp</span>(1)</span></a>). 
     4        similar to that of the ftp program (see <a class="citerefentry" href="ftp.1.html"><span class="citerefentry"><span class="refentrytitle">ftp</span>(1)</span></a>). 
    55        Operations include things like getting files from the server
    66        to the local machine, putting files from the local machine to
    77        the server, retrieving directory information from the server
    8         and so on. </p></div><div class="refsect1" lang="en"><a name="id260162"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">servicename</span></dt><dd><p>servicename is the name of the service
     8        and so on. </p></div><div class="refsect1" lang="en"><a name="id283058"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">servicename</span></dt><dd><p>servicename is the name of the service
    99                you want to use on the server. A service name takes the form
    1010                <code class="filename">//server/service</code> where <em class="parameter"><code>server
     
    2121                the <em class="parameter"><code>-R</code></em> parameter to <code class="literal">smbclient</code> or
    2222                using the name resolve order parameter in
    23                 the <a href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> file,
     23                the <a class="citerefentry" href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> file,
    2424                allowing an administrator to change the order and methods
    2525                by which server names are looked up. </p></dd><dt><span class="term">password</span></dt><dd><p>The password required to access the specified
     
    4444                        address in the Samba lmhosts file. If the line in lmhosts has
    4545                        no name type attached to the NetBIOS name (see
    46                         the <a href="lmhosts.5.html"><span class="citerefentry"><span class="refentrytitle">lmhosts</span>(5)</span></a> for details) then
     46                        the <a class="citerefentry" href="lmhosts.5.html"><span class="citerefentry"><span class="refentrytitle">lmhosts</span>(5)</span></a> for details) then
    4747                        any name type matches for lookup.</p></li><li><p><code class="constant">host</code>: Do a standard host
    4848                        name to IP address resolution, using the system <code class="filename">/etc/hosts
     
    6161                        methods as it depends on the target host being on a locally
    6262                        connected subnet.</p></li></ul></div><p>If this parameter is not set then the name resolve order
    63                 defined in the <a href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> file parameter 
     63                defined in the <a class="citerefentry" href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> file parameter 
    6464                (name resolve order) will be used. </p><p>The default order is lmhosts, host, wins, bcast and without
    6565                this parameter or any entry in the <em class="parameter"><code>name resolve order
    66                 </code></em> parameter of the <a href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> file the name resolution
     66                </code></em> parameter of the <a class="citerefentry" href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> file the name resolution
    6767                methods will be attempted in this order. </p></dd><dt><span class="term">-M NetBIOS name</span></dt><dd><p>This options allows you to send messages, using
    6868                the "WinPopup" protocol, to another computer. Once a connection is
     
    7474                is over 1600 bytes, as this is the limit of the protocol.
    7575                </p><p>
    76                 One useful trick is to cat the message through <code class="literal">smbclient</code>. For example:
    77 </p><pre class="programlisting">
    78 <code class="literal">cat mymessage.txt | smbclient -M FRED </code>
    79 </pre><p>
    80                 will send the message in the file <code class="filename">mymessage.txt</code> to the machine FRED.
     76                One useful trick is to pipe the message through <code class="literal">smbclient</code>.
     77                For example: smbclient -M FRED &lt; mymessage.txt will send the
     78                message in the file <code class="filename">mymessage.txt</code> to the
     79                machine FRED.
    8180                </p><p>You may also find the <em class="parameter"><code>-U</code></em> and
    8281                <em class="parameter"><code>-I</code></em> options useful, as they allow you to
    83                 control the FROM and TO parts of the message. </p><p>See the <em class="parameter"><code>message command</code></em> parameter in the <a href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> for a description of how to handle incoming
     82                control the FROM and TO parts of the message. </p><p>See the <em class="parameter"><code>message command</code></em> parameter in the <a class="citerefentry" href="smb.conf.5.html"><span class="citerefentry"><span class="refentrytitle">smb.conf</span>(5)</span></a> for a description of how to handle incoming
    8483                WinPopup messages in Samba. </p><p><span class="emphasis"><em>Note</em></span>: Copy WinPopup into the startup group
    8584                on your WfWg PCs if you want them to always be able to receive
     
    120119                is 65520 bytes. Setting this value smaller (to 1200 bytes) has been
    121120                observed to speed up file transfers to and from a Win9x server.
    122                 </p></dd><dt><span class="term">-V</span></dt><dd><p>Prints the program version number.
    123 </p></dd><dt><span class="term">-s &lt;configuration file&gt;</span></dt><dd><p>The file specified contains the
    124 configuration details required by the server.  The
    125 information in this file includes server-specific
    126 information such as what printcap file to use, as well
    127 as descriptions of all the services that the server is
    128 to provide. See <code class="filename">smb.conf</code> for more information.
    129 The default configuration file name is determined at
    130 compile time.</p></dd><dt><span class="term">-d|--debuglevel=level</span></dt><dd><p><em class="replaceable"><code>level</code></em> is an integer
    131 from 0 to 10.  The default value if this parameter is
    132 not specified is zero.</p><p>The higher this value, the more detail will be
     121                </p></dd><dt><span class="term">-e</span></dt><dd><p>This command line parameter requires the remote
     122                server support the UNIX extensions. Request that the connection be
     123                encrypted. This is new for Samba 3.2 and will only work with Samba
     124                3.2 or above servers. Negotiates SMB encryption using GSSAPI. Uses
     125                the given credentials for the encryption negotiaion (either kerberos
     126                or NTLMv1/v2 if given domain/username/password triple. Fails the
     127                connection if encryption cannot be negotiated.
     128                </p></dd><dt><span class="term">-d|--debuglevel=level</span></dt><dd><p><em class="replaceable"><code>level</code></em> is an integer
     129from 0 to 10. The default value if this parameter is
     130not specified is 1.</p><p>The higher this value, the more detail will be
    133131logged to the log files about the activities of the
    134132server. At level 0, only critical errors and serious
     
    140138use only by developers and generate HUGE amounts of log
    141139data, most of which is extremely cryptic.</p><p>Note that specifying this parameter here will
    142 override the <a class="indexterm" name="id300929"></a> parameter
    143 in the <code class="filename">smb.conf</code> file.</p></dd><dt><span class="term">-l|--logfile=logdirectory</span></dt><dd><p>Base directory name for log/debug files. The extension
     140override the <a class="link" href="smb.conf.5.html#LOGLEVEL">log level</a> parameter
     141in the <code class="filename">smb.conf</code> file.</p></dd><dt><span class="term">-V</span></dt><dd><p>Prints the program version number.
     142</p></dd><dt><span class="term">-s &lt;configuration file&gt;</span></dt><dd><p>The file specified contains the
     143configuration details required by the server.  The
     144information in this file includes server-specific
     145information such as what printcap file to use, as well
     146as descriptions of all the services that the server is
     147to provide. See <code class="filename">smb.conf</code> for more information.
     148The default configuration file name is determined at
     149compile time.</p></dd><dt><span class="term">-l|--log-basename=logdirectory</span></dt><dd><p>Base directory name for log/debug files. The extension
    144150<code class="constant">".progname"</code> will be appended (e.g. log.smbclient,
    145151log.smbd, etc...). The log file is never removed by the client.
     
    177183it in directly. </p></dd><dt><span class="term">-n &lt;primary NetBIOS name&gt;</span></dt><dd><p>This option allows you to override
    178184the NetBIOS name that Samba uses for itself. This is identical
    179 to setting the <a class="indexterm" name="id301083"></a> parameter in the <code class="filename">smb.conf</code> file.
     185to setting the <a class="link" href="smb.conf.5.html#NETBIOSNAME">netbios name</a> parameter in the <code class="filename">smb.conf</code> file.
    180186However, a command
    181187line setting will take precedence over settings in
     
    262268                commands to be executed instead of prompting from stdin. <em class="parameter"><code>
    263269                -N</code></em> is implied by <em class="parameter"><code>-c</code></em>.</p><p>This is particularly useful in scripts and for printing stdin
    264                 to the server, e.g. <code class="literal">-c 'print -'</code>. </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id301528"></a><h2>OPERATIONS</h2><p>Once the client is running, the user is presented with
     270                to the server, e.g. <code class="literal">-c 'print -'</code>. </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id325619"></a><h2>OPERATIONS</h2><p>Once the client is running, the user is presented with
    265271        a prompt : </p><p><code class="prompt">smb:\&gt; </code></p><p>The backslash ("\\") indicates the current working directory
    266272        on the server, and will change if the current working directory
     
    278284        performed by issuing a request to the server. Thus the behavior may
    279285        vary from server to server, depending on how the server was implemented.
    280         </p><p>The commands available are given here in alphabetical order. </p><div class="variablelist"><dl><dt><span class="term">? [command]</span></dt><dd><p>If <em class="replaceable"><code>command</code></em> is specified, the ? command will display 
    281                 a brief informative message about the specified command.  If no 
     286        </p><p>The commands available are given here in alphabetical order. </p><div class="variablelist"><dl><dt><span class="term">? [command]</span></dt><dd><p>If <em class="replaceable"><code>command</code></em> is specified, the ? command will display
     287                a brief informative message about the specified command.  If no
    282288                command is specified, a list of available commands will
    283                 be displayed. </p></dd><dt><span class="term">! [shell command]</span></dt><dd><p>If <em class="replaceable"><code>shell command</code></em> is specified, the ! 
    284                 command will execute a shell locally and run the specified shell
    285                 command. If no command is specified, a local shell will be run.
     289                be displayed. </p></dd><dt><span class="term">! [shell command]</span></dt><dd><p>If <em class="replaceable"><code>shell command</code></em> is specified, the !
     290                command will execute a shell locally and run the specified shell
     291                command. If no command is specified, a local shell will be run.
     292                </p></dd><dt><span class="term">allinfo file</span></dt><dd><p>The client will request that the server return
     293                all known information about a file or directory (including streams).
    286294                </p></dd><dt><span class="term">altname file</span></dt><dd><p>The client will request that the server return
    287295                the "alternate" name (the 8.3 name) for a file or directory.
     296                </p></dd><dt><span class="term">archive &lt;number&gt;</span></dt><dd><p>Sets the archive level when operating on files.
     297                0 means ignore the archive bit, 1 means only operate on files with this bit set,
     298                2 means only operate on files with this bit set and reset it after operation,
     299                3 means operate on all files and reset it after operation. The default is 0.
     300                </p></dd><dt><span class="term">blocksize &lt;number&gt;</span></dt><dd><p>Sets the blocksize parameter for a tar operation. The default is 20.
     301                Causes tar file to be written out in blocksize*TBLOCK (normally 512 byte) units.
     302                </p></dd><dt><span class="term">cancel jobid0 [jobid1] ... [jobidN]</span></dt><dd><p>The client will request that the server cancel
     303                the printjobs identified by the given numeric print job ids.
    288304                </p></dd><dt><span class="term">case_sensitive</span></dt><dd><p>Toggles the setting of the flag in SMB packets that
    289305                tells the server to treat filenames as case sensitive. Set to OFF by
     
    291307                currently affects Samba 3.0.5 and above file servers with the case sensitive
    292308                parameter set to auto in the smb.conf.
    293                 </p></dd><dt><span class="term">cancel jobid0 [jobid1] ... [jobidN]</span></dt><dd><p>The client will request that the server cancel
    294                 the printjobs identified by the given numeric print job ids.
    295                 </p></dd><dt><span class="term">chmod file mode in octal</span></dt><dd><p>This command depends on the server supporting the CIFS
     309                </p></dd><dt><span class="term">cd &lt;directory name&gt;</span></dt><dd><p>If "directory name" is specified, the current
     310                working directory on the server will be changed to the directory
     311                specified. This operation will fail if for any reason the specified
     312                directory is inaccessible. </p><p>If no directory name is specified, the current working
     313                directory on the server will be reported. </p></dd><dt><span class="term">chmod file mode in octal</span></dt><dd><p>This command depends on the server supporting the CIFS
    296314                UNIX extensions and will fail if the server does not. The client requests that the server
    297315                change the UNIX permissions to the given octal mode, in standard UNIX format.
     
    301319                currently no way to remotely look up the UNIX uid and gid values for a given name.
    302320                This may be addressed in future versions of the CIFS UNIX extensions.
    303                 </p></dd><dt><span class="term">cd [directory name]</span></dt><dd><p>If "directory name" is specified, the current
    304                 working directory on the server will be changed to the directory
    305                 specified. This operation will fail if for any reason the specified
    306                 directory is inaccessible. </p><p>If no directory name is specified, the current working
    307                 directory on the server will be reported. </p></dd><dt><span class="term">del &lt;mask&gt;</span></dt><dd><p>The client will request that the server attempt
    308                 to delete all files matching <em class="replaceable"><code>mask</code></em> from the current working
    309                 directory on the server. </p></dd><dt><span class="term">dir &lt;mask&gt;</span></dt><dd><p>A list of the files matching <em class="replaceable"><code>mask</code></em> in the current
    310                 working directory on the server will be retrieved from the server
    311                 and displayed. </p></dd><dt><span class="term">exit</span></dt><dd><p>Terminate the connection with the server and exit
    312                 from the program. </p></dd><dt><span class="term">get &lt;remote file name&gt; [local file name]</span></dt><dd><p>Copy the file called <code class="filename">remote file name</code> from
    313                 the server to the machine running the client. If specified, name
    314                 the local copy <code class="filename">local file name</code>.  Note that all transfers in
    315                 <code class="literal">smbclient</code> are binary. See also the
    316                 lowercase command. </p></dd><dt><span class="term">help [command]</span></dt><dd><p>See the ? command above. </p></dd><dt><span class="term">lcd [directory name]</span></dt><dd><p>If <em class="replaceable"><code>directory name</code></em> is specified, the current
    317                 working directory on the local machine will be changed to
    318                 the directory specified. This operation will fail if for any
    319                 reason the specified directory is inaccessible. </p><p>If no directory name is specified, the name of the
    320                 current working directory on the local machine will be reported.
     321                </p></dd><dt><span class="term">close &lt;fileid&gt;</span></dt><dd><p>Closes a file explicitly opened by the open command. Used for
     322                internal Samba testing purposes.
     323                </p></dd><dt><span class="term">del &lt;mask&gt;</span></dt><dd><p>The client will request that the server attempt
     324                to delete all files matching <em class="replaceable"><code>mask</code></em> from the current working
     325                directory on the server. </p></dd><dt><span class="term">dir &lt;mask&gt;</span></dt><dd><p>A list of the files matching <em class="replaceable"><code>mask</code></em> in the current
     326                working directory on the server will be retrieved from the server
     327                and displayed. </p></dd><dt><span class="term">du &lt;filename&gt;</span></dt><dd><p>Does a directory listing and then prints out the current disk useage and free space on a share.
     328                </p></dd><dt><span class="term">echo &lt;number&gt; &lt;data&gt;</span></dt><dd><p>Does an SMBecho request to ping the server. Used for internal Samba testing purposes.
     329                </p></dd><dt><span class="term">exit</span></dt><dd><p>Terminate the connection with the server and exit
     330                from the program. </p></dd><dt><span class="term">get &lt;remote file name&gt; [local file name]</span></dt><dd><p>Copy the file called <code class="filename">remote file name</code> from
     331                the server to the machine running the client. If specified, name
     332                the local copy <code class="filename">local file name</code>.  Note that all transfers in
     333                <code class="literal">smbclient</code> are binary. See also the
     334                lowercase command. </p></dd><dt><span class="term">getfacl &lt;filename&gt;</span></dt><dd><p>Requires the server support the UNIX extensions. Requests and prints
     335                the POSIX ACL on a file.
     336                </p></dd><dt><span class="term">hardlink &lt;src&gt; &lt;dest&lt;</span></dt><dd><p>Creates a hardlink on the server using Windows CIFS semantics.
     337                the POSIX ACL on a file.
     338                </p></dd><dt><span class="term">help [command]</span></dt><dd><p>See the ? command above. </p></dd><dt><span class="term">history</span></dt><dd><p>Displays the command history.</p></dd><dt><span class="term">iosize &lt;bytes&gt;</span></dt><dd><p>When sending or receiving files, smbclient uses an
     339                internal memory buffer by default of size 64512 bytes. This command
     340                allows this size to be set to any range between 16384 (0x4000) bytes
     341                and 16776960 (0xFFFF00) bytes. Larger sizes may mean more efficient
     342                data transfer as smbclient will try and use the most efficient
     343                read and write calls for the connected server.
     344                </p></dd><dt><span class="term">lcd [directory name]</span></dt><dd><p>If <em class="replaceable"><code>directory name</code></em> is specified, the current
     345                working directory on the local machine will be changed to
     346                the directory specified. This operation will fail if for any
     347                reason the specified directory is inaccessible. </p><p>If no directory name is specified, the name of the
     348                current working directory on the local machine will be reported.
    321349                </p></dd><dt><span class="term">link target linkname</span></dt><dd><p>This command depends on the server supporting the CIFS
    322350                UNIX extensions and will fail if the server does not. The client requests that the server
    323351                create a hard link between the linkname and target files. The linkname file
    324352                must not exist.
    325                 </p></dd><dt><span class="term">lowercase</span></dt><dd><p>Toggle lowercasing of filenames for the get and
    326                 mget commands. </p><p>When lowercasing is toggled ON, local filenames are converted
     353                </p></dd><dt><span class="term">listconnect</span></dt><dd><p>Show the current connections held for DFS purposes.
     354                </p></dd><dt><span class="term">lock &lt;filenum&gt; &lt;r|w&gt; &lt;hex-start&gt; &lt;hex-len&gt;</span></dt><dd><p>This command depends on the server supporting the CIFS
     355                UNIX extensions and will fail if the server does not. Tries to set a POSIX
     356                fcntl lock of the given type on the given range. Used for internal Samba testing purposes.
     357                </p></dd><dt><span class="term">logon &lt;username&gt; &lt;password&gt;</span></dt><dd><p>Establishes a new vuid for this session by logging on again.
     358                Replaces the current vuid. Prints out the new vuid. Used for internal Samba testing purposes.
     359                </p></dd><dt><span class="term">lowercase</span></dt><dd><p>Toggle lowercasing of filenames for the get and
     360                mget commands.         
     361                </p><p>When lowercasing is toggled ON, local filenames are converted
    327362                to lowercase when using the get and mget commands. This is
    328                 often useful when copying (say) MSDOS files from a server, because 
    329                 lowercase filenames are the norm on UNIX systems. </p></dd><dt><span class="term">ls &lt;mask&gt;</span></dt><dd><p>See the dir command above. </p></dd><dt><span class="term">mask &lt;mask&gt;</span></dt><dd><p>This command allows the user to set up a mask 
    330                 which will be used during recursive operation of the mget and 
    331                 mput commands. </p><p>The masks specified to the mget and mput commands act as 
    332                 filters for directories rather than files when recursion is 
    333                 toggled ON. </p><p>The mask specified with the mask command is necessary 
     363                often useful when copying (say) MSDOS files from a server, because
     364                lowercase filenames are the norm on UNIX systems. </p></dd><dt><span class="term">ls &lt;mask&gt;</span></dt><dd><p>See the dir command above. </p></dd><dt><span class="term">mask &lt;mask&gt;</span></dt><dd><p>This command allows the user to set up a mask
     365                which will be used during recursive operation of the mget and
     366                mput commands. </p><p>The masks specified to the mget and mput commands act as
     367                filters for directories rather than files when recursion is
     368                toggled ON. </p><p>The mask specified with the mask command is necessary
    334369                to filter files within those directories. For example, if the
    335                 mask specified in an mget command is "source*" and the mask
    336                 specified with the mask command is "*.c" and recursion is
    337                 toggled ON, the mget command will retrieve all files matching
    338                 "*.c" in all directories below and including all directories
    339                 matching "source*" in the current working directory. </p><p>Note that the value for mask defaults to blank (equivalent
    340                 to "*") and remains so until the mask command is used to change it.
    341                 It retains the most recently specified value indefinitely. To
    342                 avoid unexpected results it would be wise to change the value of
    343                 mask back to "*" after using the mget or mput commands. </p></dd><dt><span class="term">md &lt;directory name&gt;</span></dt><dd><p>See the mkdir command. </p></dd><dt><span class="term">mget &lt;mask&gt;</span></dt><dd><p>Copy all files matching <em class="replaceable"><code>mask</code></em> from the server to
    344                 the machine running the client. </p><p>Note that <em class="replaceable"><code>mask</code></em> is interpreted differently during recursive
    345                 operation and non-recursive operation - refer to the recurse and
    346                 mask commands for more information. Note that all transfers in
    347                 <code class="literal">smbclient</code> are binary. See also the lowercase command. </p></dd><dt><span class="term">mkdir &lt;directory name&gt;</span></dt><dd><p>Create a new directory on the server (user access
    348                 privileges permitting) with the specified name. </p></dd><dt><span class="term">mput &lt;mask&gt;</span></dt><dd><p>Copy all files matching <em class="replaceable"><code>mask</code></em> in the current working
    349                 directory on the local machine to the current working directory on
    350                 the server. </p><p>Note that <em class="replaceable"><code>mask</code></em> is interpreted differently during recursive
    351                 operation and non-recursive operation - refer to the recurse and mask
    352                 commands for more information. Note that all transfers in <code class="literal">smbclient</code>
    353                 are binary. </p></dd><dt><span class="term">print &lt;file name&gt;</span></dt><dd><p>Print the specified file from the local machine
    354                 through a printable service on the server. </p></dd><dt><span class="term">prompt</span></dt><dd><p>Toggle prompting for filenames during operation
    355                 of the mget and mput commands. </p><p>When toggled ON, the user will be prompted to confirm
    356                 the transfer of each file during these commands. When toggled
    357                 OFF, all specified files will be transferred without prompting.
    358                 </p></dd><dt><span class="term">put &lt;local file name&gt; [remote file name]</span></dt><dd><p>Copy the file called <code class="filename">local file name</code> from the
     370                mask specified in an mget command is "source*" and the mask
     371                specified with the mask command is "*.c" and recursion is
     372                toggled ON, the mget command will retrieve all files matching
     373                "*.c" in all directories below and including all directories
     374                matching "source*" in the current working directory. </p><p>Note that the value for mask defaults to blank (equivalent
     375                to "*") and remains so until the mask command is used to change it.
     376                It retains the most recently specified value indefinitely. To
     377                avoid unexpected results it would be wise to change the value of
     378                mask back to "*" after using the mget or mput commands. </p></dd><dt><span class="term">md &lt;directory name&gt;</span></dt><dd><p>See the mkdir command. </p></dd><dt><span class="term">mget &lt;mask&gt;</span></dt><dd><p>Copy all files matching <em class="replaceable"><code>mask</code></em> from the server to
     379                the machine running the client. </p><p>Note that <em class="replaceable"><code>mask</code></em> is interpreted differently during recursive
     380                operation and non-recursive operation - refer to the recurse and
     381                mask commands for more information. Note that all transfers in
     382                <code class="literal">smbclient</code> are binary. See also the lowercase command. </p></dd><dt><span class="term">mkdir &lt;directory name&gt;</span></dt><dd><p>Create a new directory on the server (user access
     383                privileges permitting) with the specified name. </p></dd><dt><span class="term">more &lt;file name&gt;</span></dt><dd><p>Fetch a remote file and view it with the contents
     384                of your PAGER environment variable.
     385                </p></dd><dt><span class="term">mput &lt;mask&gt;</span></dt><dd><p>Copy all files matching <em class="replaceable"><code>mask</code></em> in the current working
     386                directory on the local machine to the current working directory on
     387                the server. </p><p>Note that <em class="replaceable"><code>mask</code></em> is interpreted differently during recursive
     388                operation and non-recursive operation - refer to the recurse and mask
     389                commands for more information. Note that all transfers in <code class="literal">smbclient</code>
     390                are binary. </p></dd><dt><span class="term">posix</span></dt><dd><p>Query the remote server to see if it supports the CIFS UNIX
     391                extensions and prints out the list of capabilities supported. If so, turn
     392                on POSIX pathname processing and large file read/writes (if available),.
     393                </p></dd><dt><span class="term">posix_encrypt &lt;domain&gt; &lt;username&gt; &lt;password&gt;</span></dt><dd><p>This command depends on the server supporting the CIFS
     394                UNIX extensions and will fail if the server does not. Attempt to negotiate
     395                SMB encryption on this connection. If smbclient connected with kerberos
     396                credentials (-k) the arguments to this command are ignored and the kerberos
     397                credentials are used to negotiate GSSAPI signing and sealing instead. See
     398                also the -e option to smbclient to force encryption on initial connection.
     399                This command is new with Samba 3.2.
     400                </p></dd><dt><span class="term">posix_open &lt;filename&gt; &lt;octal mode&gt;</span></dt><dd><p>This command depends on the server supporting the CIFS
     401                UNIX extensions and will fail if the server does not. Opens a remote file
     402                using the CIFS UNIX extensions and prints a fileid. Used for internal Samba
     403                testing purposes.
     404                </p></dd><dt><span class="term">posix_mkdir &lt;directoryname&gt; &lt;octal mode&gt;</span></dt><dd><p>This command depends on the server supporting the CIFS
     405                UNIX extensions and will fail if the server does not. Creates a remote directory
     406                using the CIFS UNIX extensions with the given mode.
     407                </p></dd><dt><span class="term">posix_rmdir &lt;directoryname&gt;</span></dt><dd><p>This command depends on the server supporting the CIFS
     408                UNIX extensions and will fail if the server does not. Deletes a remote directory
     409                using the CIFS UNIX extensions.
     410                </p></dd><dt><span class="term">posix_unlink &lt;filename&gt;</span></dt><dd><p>This command depends on the server supporting the CIFS
     411                UNIX extensions and will fail if the server does not. Deletes a remote file
     412                using the CIFS UNIX extensions.
     413                </p></dd><dt><span class="term">print &lt;file name&gt;</span></dt><dd><p>Print the specified file from the local machine
     414                through a printable service on the server. </p></dd><dt><span class="term">prompt</span></dt><dd><p>Toggle prompting for filenames during operation
     415                of the mget and mput commands. </p><p>When toggled ON, the user will be prompted to confirm
     416                the transfer of each file during these commands. When toggled
     417                OFF, all specified files will be transferred without prompting.
     418                </p></dd><dt><span class="term">put &lt;local file name&gt; [remote file name]</span></dt><dd><p>Copy the file called <code class="filename">local file name</code> from the
    359419                machine running the client to the server. If specified,
    360                 name the remote copy <code class="filename">remote file name</code>. Note that all transfers 
    361                 in <code class="literal">smbclient</code> are binary. See also the lowercase command. 
    362                 </p></dd><dt><span class="term">queue</span></dt><dd><p>Displays the print queue, showing the job id, 
    363                 name, size and current status. </p></dd><dt><span class="term">quit</span></dt><dd><p>See the exit command. </p></dd><dt><span class="term">rd &lt;directory name&gt;</span></dt><dd><p>See the rmdir command. </p></dd><dt><span class="term">recurse</span></dt><dd><p>Toggle directory recursion for the commands mget 
    364                 and mput. </p><p>When toggled ON, these commands will process all directories 
     420                name the remote copy <code class="filename">remote file name</code>. Note that all transfers
     421                in <code class="literal">smbclient</code> are binary. See also the lowercase command.
     422                </p></dd><dt><span class="term">queue</span></dt><dd><p>Displays the print queue, showing the job id,
     423                name, size and current status. </p></dd><dt><span class="term">quit</span></dt><dd><p>See the exit command. </p></dd><dt><span class="term">rd &lt;directory name&gt;</span></dt><dd><p>See the rmdir command. </p></dd><dt><span class="term">recurse</span></dt><dd><p>Toggle directory recursion for the commands mget
     424                and mput. </p><p>When toggled ON, these commands will process all directories
    365425                in the source directory (i.e., the directory they are copying
    366                 from ) and will recurse into any that match the mask specified
    367                 to the command. Only files that match the mask specified using
    368                 the mask command will be retrieved. See also the mask command.
    369                 </p><p>When recursion is toggled OFF, only files from the current
    370                 working directory on the source machine that match the mask specified
    371                 to the mget or mput commands will be copied, and any mask specified
    372                 using the mask command will be ignored. </p></dd><dt><span class="term">rm &lt;mask&gt;</span></dt><dd><p>Remove all files matching <em class="replaceable"><code>mask</code></em> from the current
    373                 working directory on the server. </p></dd><dt><span class="term">rmdir &lt;directory name&gt;</span></dt><dd><p>Remove the specified directory (user access
    374                 privileges permitting) from the server. </p></dd><dt><span class="term">setmode &lt;filename&gt; &lt;perm=[+|\-]rsha&gt;</span></dt><dd><p>A version of the DOS attrib command to set
    375                 file permissions. For example: </p><p><code class="literal">setmode myfile +r </code></p><p>would make myfile read only. </p></dd><dt><span class="term">stat file</span></dt><dd><p>This command depends on the server supporting the CIFS
     426                from ) and will recurse into any that match the mask specified
     427                to the command. Only files that match the mask specified using
     428                the mask command will be retrieved. See also the mask command.
     429                </p><p>When recursion is toggled OFF, only files from the current
     430                working directory on the source machine that match the mask specified
     431                to the mget or mput commands will be copied, and any mask specified
     432                using the mask command will be ignored. </p></dd><dt><span class="term">rm &lt;mask&gt;</span></dt><dd><p>Remove all files matching <em class="replaceable"><code>mask</code></em> from the current
     433                working directory on the server. </p></dd><dt><span class="term">rmdir &lt;directory name&gt;</span></dt><dd><p>Remove the specified directory (user access
     434                privileges permitting) from the server. </p></dd><dt><span class="term">setmode &lt;filename&gt; &lt;perm=[+|\-]rsha&gt;</span></dt><dd><p>A version of the DOS attrib command to set
     435                file permissions. For example: </p><p><code class="literal">setmode myfile +r </code></p><p>would make myfile read only. </p></dd><dt><span class="term">showconnect</span></dt><dd><p>Show the currently active connection held for DFS purposes.
     436                </p></dd><dt><span class="term">stat file</span></dt><dd><p>This command depends on the server supporting the CIFS
    376437                UNIX extensions and will fail if the server does not. The client requests the
    377438                UNIX basic info level and prints out the same info that the Linux stat command
     
    383444                UNIX extensions and will fail if the server does not. The client requests that the server
    384445                create a symbolic hard link between the target and linkname files. The linkname file
    385                 must not exist. Note that the server will not create a link to any path that lies 
     446                must not exist. Note that the server will not create a link to any path that lies
    386447                outside the currently connected share. This is enforced by the Samba server.
    387448                </p></dd><dt><span class="term">tar &lt;c|x&gt;[IXbgNa]</span></dt><dd><p>Performs a tar operation - see the <em class="parameter"><code>-T
    388                 </code></em> command line option above. Behavior may be affected
    389                 by the tarmode command (see below). Using g (incremental) and N
    390                 (newer) will affect tarmode settings. Note that using the "-" option
    391                 with tar x may not work - use the command line option instead.
    392                 </p></dd><dt><span class="term">blocksize &lt;blocksize&gt;</span></dt><dd><p>Blocksize. Must be followed by a valid (greater
    393                 than zero) blocksize. Causes tar file to be written out in
    394                 <em class="replaceable"><code>blocksize</code></em>*TBLOCK (usually 512 byte) blocks. </p></dd><dt><span class="term">tarmode &lt;full|inc|reset|noreset&gt;</span></dt><dd><p>Changes tar's behavior with regard to archive
    395                 bits. In full mode, tar will back up everything regardless of the
    396                 archive bit setting (this is the default mode). In incremental mode,
    397                 tar will only back up files with the archive bit set. In reset mode,
    398                 tar will reset the archive bit on all files it backs up (implies
    399                 read/write share). </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id302201"></a><h2>NOTES</h2><p>Some servers are fussy about the case of supplied usernames,
    400         passwords, share names (AKA service names) and machine names.
    401         If you fail to connect try giving all parameters in uppercase.
    402         </p><p>It is often necessary to use the -n option when connecting
    403         to some types of servers. For example OS/2 LanManager insists
    404         on a valid NetBIOS name being used, so you need to supply a valid
     449                </code></em> command line option above. Behavior may be affected
     450                by the tarmode command (see below). Using g (incremental) and N
     451                (newer) will affect tarmode settings. Note that using the "-" option
     452                with tar x may not work - use the command line option instead.
     453                </p></dd><dt><span class="term">blocksize &lt;blocksize&gt;</span></dt><dd><p>Blocksize. Must be followed by a valid (greater
     454                than zero) blocksize. Causes tar file to be written out in
     455                <em class="replaceable"><code>blocksize</code></em>*TBLOCK (usually 512 byte) blocks. </p></dd><dt><span class="term">tarmode &lt;full|inc|reset|noreset&gt;</span></dt><dd><p>Changes tar's behavior with regard to archive
     456                bits. In full mode, tar will back up everything regardless of the
     457                archive bit setting (this is the default mode). In incremental mode,
     458                tar will only back up files with the archive bit set. In reset mode,
     459                tar will reset the archive bit on all files it backs up (implies
     460                read/write share). </p></dd><dt><span class="term">unlock &lt;filenum&gt; &lt;hex-start&gt; &lt;hex-len&gt;</span></dt><dd><p>This command depends on the server supporting the CIFS
     461                UNIX extensions and will fail if the server does not. Tries to unlock a POSIX
     462                fcntl lock on the given range. Used for internal Samba testing purposes.
     463                </p></dd><dt><span class="term">volume</span></dt><dd><p>Prints the current volume name of the share.
     464                </p></dd><dt><span class="term">vuid &lt;number&gt;</span></dt><dd><p>Changes the currently used vuid in the protocol to
     465                the given arbitrary number. Without an argument prints out the current
     466                vuid being used. Used for internal Samba testing purposes.
     467                </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id326556"></a><h2>NOTES</h2><p>Some servers are fussy about the case of supplied usernames,
     468        passwords, share names (AKA service names) and machine names.
     469        If you fail to connect try giving all parameters in uppercase.
     470        </p><p>It is often necessary to use the -n option when connecting
     471        to some types of servers. For example OS/2 LanManager insists
     472        on a valid NetBIOS name being used, so you need to supply a valid
    405473        name that would be known to the server.</p><p>smbclient supports long file names where the server
    406         supports the LANMAN2 protocol or above. </p></div><div class="refsect1" lang="en"><a name="id302222"></a><h2>ENVIRONMENT VARIABLES</h2><p>The variable <code class="envar">USER</code> may contain the
     474        supports the LANMAN2 protocol or above. </p></div><div class="refsect1" lang="en"><a name="id326576"></a><h2>ENVIRONMENT VARIABLES</h2><p>The variable <code class="envar">USER</code> may contain the
    407475        username of the person  using the client. This information is
    408476        used only if the protocol  level is high enough to support
     
    414482        to instead of connecting to a server.  This functionality is primarily
    415483        intended as a development aid, and works best when using a LMHOSTS
    416         file</p></div><div class="refsect1" lang="en"><a name="id302255"></a><h2>INSTALLATION</h2><p>The location of the client program is a matter for
     484        file</p></div><div class="refsect1" lang="en"><a name="id326607"></a><h2>INSTALLATION</h2><p>The location of the client program is a matter for
    417485        individual system administrators. The following are thus
    418486        suggestions only. </p><p>It is recommended that the smbclient software be installed
     
    423491        setuid or setgid! </p><p>The client log files should be put in a directory readable
    424492        and writeable only by the user. </p><p>To test the client, you will need to know the name of a
    425         running SMB/CIFS server. It is possible to run <a href="smbd.8.html"><span class="citerefentry"><span class="refentrytitle">smbd</span>(8)</span></a> as an ordinary user - running that server as a daemon
     493        running SMB/CIFS server. It is possible to run <a class="citerefentry" href="smbd.8.html"><span class="citerefentry"><span class="refentrytitle">smbd</span>(8)</span></a> as an ordinary user - running that server as a daemon
    426494        on a user-accessible port (typically any port number over 1024)
    427         would provide a suitable test server. </p></div><div class="refsect1" lang="en"><a name="id302304"></a><h2>DIAGNOSTICS</h2><p>Most diagnostics issued by the client are logged in a
     495        would provide a suitable test server. </p></div><div class="refsect1" lang="en"><a name="id326654"></a><h2>DIAGNOSTICS</h2><p>Most diagnostics issued by the client are logged in a
    428496        specified log file. The log file name is specified at compile time,
    429497        but may be overridden on the command line. </p><p>The number and nature of diagnostics available depends
    430498        on the debug level used by the client. If you have problems,
    431         set the debug level to 3 and peruse the log files. </p></div><div class="refsect1" lang="en"><a name="id302321"></a><h2>VERSION</h2><p>This man page is correct for version 3 of the Samba suite.</p></div><div class="refsect1" lang="en"><a name="id302331"></a><h2>AUTHOR</h2><p>The original Samba software and related utilities
     499        set the debug level to 3 and peruse the log files. </p></div><div class="refsect1" lang="en"><a name="id326670"></a><h2>VERSION</h2><p>This man page is correct for version 3.2 of the Samba suite.</p></div><div class="refsect1" lang="en"><a name="id326681"></a><h2>AUTHOR</h2><p>The original Samba software and related utilities
    432500        were created by Andrew Tridgell. Samba is now developed
    433501        by the Samba Team as an Open Source project similar
    434502        to the way the Linux kernel is developed.</p><p>The original Samba man pages were written by Karl Auer.
    435503        The man page sources were converted to YODL format (another
    436         excellent piece of Open Source software, available at <a href="ftp://ftp.icce.rug.nl/pub/unix/" target="_top">
     504        excellent piece of Open Source software, available at <a class="ulink" href="ftp://ftp.icce.rug.nl/pub/unix/" target="_top">
    437505        ftp://ftp.icce.rug.nl/pub/unix/</a>) and updated for the Samba 2.0
    438506        release by Jeremy Allison.  The conversion to DocBook for
Note: See TracChangeset for help on using the changeset viewer.