IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
parameter in the smb.conf file, allowing an administrator to change
the order and methods by which server names are looked up.
<p><br><aname="password"></a>
<li><strong><strong>password</strong></strong> password is the password required to access the
specified service on the specified server. If this parameter is
supplied, the <ahref="smbclient.1.html#minusN"><strong>-N</strong></a> option (suppress password prompt) is assumed.
<p><br>There is no default password. If no password is supplied on the
command line (either by using this parameter or adding a password to
the <ahref="smbclient.1.html#minusU"><strong>-U</strong></a> option (see below)) and the <ahref="smbclient.1.html#minusN"><strong>-N</strong></a> option is not specified,
the client will prompt for a password, even if the desired service
does not require one. (If no password is required, simply press ENTER
to provide a null password.)
<p><br>Note: Some servers (including OS/2 and Windows for Workgroups) insist
on an uppercase password. Lowercase or mixed case passwords may be
rejected by these servers.
<p><br>Be cautious about including passwords in scripts.
<p><br><aname="minuss"></a>
<li><strong><strong>-s smb.conf</strong></strong> This parameter specifies the pathname to the
Samba configuration file, smb.conf. This file controls all aspects of
the Samba setup on the machine and smbclient also needs to read this
file.
<p><br><aname="minusB"></a>
<li><strong><strong>-B IP addr</strong></strong> The IP address to use when sending a broadcast packet.
<p><br><aname="minusO"></a>
<li><strong><strong>-O socket options</strong></strong> TCP socket options to set on the client
socket. See the <ahref="smb.conf.5.html#socketoptions">socket options</a>
parameter in the <ahref="smb.conf.5.html"><strong>smb.conf (5)</strong></a> manpage for
the list of valid options.
<p><br><aname="minusR"></a>
<li><strong><strong>-R name resolve order</strong></strong> This option allows the user of
smbclient to determine what name resolution services to use when
looking up the NetBIOS name of the host being connected to.
<p><br>The options are :"lmhosts", "host", "wins" and "bcast". They cause
names to be resolved as follows :
<p><br><ul>
<p><br><li><strong>lmhosts</strong> : Lookup an IP address in the Samba lmhosts file.
The lmhosts file is stored in the same directory as the
<p><br>will send the message in the file <em>mymessage.txt</em> to the machine FRED.
<p><br>You may also find the <ahref="smbclient.1.html#minusU"><strong>-U</strong></a> and <ahref="smbclient.1.html#minusI"><strong>-I</strong></a> options useful, as they allow
you to control the FROM and TO parts of the message.
<p><br>See the <ahref="smb.conf.5.html#messagecommand"><strong>message command</strong></a>
parameter in the <strong>smb.conf (5)</strong> for a description of how to handle
incoming WinPopup messages in Samba.
<p><br>Note: Copy WinPopup into the startup group on your WfWg PCs if you
want them to always be able to receive messages.
<p><br><aname="minusi"></a>
<li><strong><strong>-i scope</strong></strong> This specifies a NetBIOS scope that smbclient will use
to communicate with when generating NetBIOS names. For details on the
use of NetBIOS scopes, see rfc1001.txt and rfc1002.txt. NetBIOS scopes
are <em>very</em> rarely used, only set this parameter if you are the
system administrator in charge of all the NetBIOS systems you
communicate with.
<p><br><aname="minusN"></a>
<li><strong><strong>-N</strong></strong> If specified, this parameter suppresses the normal
password prompt from the client to the user. This is useful when
accessing a service that does not require a password.
<p><br>Unless a password is specified on the command line or this parameter
is specified, the client will request a password.
<p><br><aname="minusn"></a>
<li><strong><strong>-n NetBIOS name</strong></strong> By default, the client will use the local
machine's hostname (in uppercase) as its NetBIOS name. This parameter
allows you to override the host name and use whatever NetBIOS name you
wish.
<p><br><aname="minusd"></a>
<li><strong><strong>-d debuglevel</strong></strong> debuglevel is an integer from 0 to 10, or the
letter 'A'.
<p><br>The default value if this parameter is not specified is zero.
<p><br>The higher this value, the more detail will be logged to the log files
about the activities of the client. At level 0, only critical errors
and serious warnings will be logged. Level 1 is a reasonable level for
day to day running - it generates a small amount of information about
operations carried out.
<p><br>Levels above 1 will generate considerable amounts of log data, and
should only be used when investigating a problem. Levels above 3 are
designed for use only by developers and generate HUGE amounts of log
data, most of which is extremely cryptic. If debuglevel is set to the
letter 'A', then <em>all</em> debug messages will be printed. This setting
is for developers only (and people who <em>really</em> want to know how the
code works internally).
<p><br>Note that specifying this parameter here will override the <ahref="smb.conf.5.html#loglevel"><strong>log
level</strong></a> parameter in the <ahref="smb.conf.5.html"><strong>smb.conf
(5)</strong></a> file.
<p><br><aname="minusP"></a>
<li><strong><strong>-P</strong></strong> This option is no longer used. The code in Samba2.0
now lets the server decide the device type, so no printer specific
flag is needed.
<p><br><aname="minusp"></a>
<li><strong><strong>-p port</strong></strong> This number is the TCP port number that will be used
when making connections to the server. The standard (well-known) TCP
port number for an SMB/CIFS server is 139, which is the default.
<p><br><aname="minusl"></a>
<li><strong><strong>-l logfilename</strong></strong> If specified, logfilename specifies a base
filename into which operational data from the running client will be
logged.
<p><br>The default base name is specified at compile time.
<p><br>The base name is used to generate actual log file names. For example,
if the name specified was "log", the debug file would be
<code>log.client</code>.
<p><br>The log file generated is never removed by the client.
<p><br><aname="minush"></a>
<li><strong><strong>-h</strong></strong> Print the usage message for the client.
<p><br><aname="minusI"></a>
<li><strong><strong>-I IP address</strong></strong> IP address is the address of the server to
connect to. It should be specified in standard "a.b.c.d" notation.
<p><br>Normally the client would attempt to locate a named SMB/CIFS server by
looking it up via the NetBIOS name resolution mechanism described
above in the <ahref="smbclient.1.html#minusR"><strong>name resolve order</strong></a> parameter
above. Using this parameter will force the client to assume that the
server is on the machine with the specified IP address and the NetBIOS
name component of the resource being connected to will be ignored.
<p><br>There is no default for this parameter. If not supplied, it will be
determined automatically by the client as described above.
<p><br><aname="minusE"></a>
<li><strong><strong>-E</strong></strong> This parameter causes the client to write messages to the
standard error stream (stderr) rather than to the standard output
stream.
<p><br>By default, the client writes messages to standard output - typically
the user's tty.
<p><br><aname="minusU"></a>
<li><strong><strong>-U username</strong></strong> This specifies the user name that will be used by
the client to make a connection, assuming your server is not a downlevel
server that is running a protocol level that uses passwords on shares,
not on usernames.
<p><br>Some servers are fussy about the case of this name, and some insist
that it must be a valid NetBIOS name.
<p><br>If no username is supplied, it will default to an uppercase version of
the environment variable <code>USER</code> or <code>LOGNAME</code> in that order. If no
username is supplied and neither environment variable exists the
username "GUEST" will be used.
<p><br>If the <code>USER</code> environment variable containts a '%' character,
everything after that will be treated as a password. This allows you
to set the environment variable to be <code>USER=username%password</code> so
that a password is not passed on the command line (where it may be
seen by the ps command).
<p><br>If the service you are connecting to requires a password, it can be
supplied using the <ahref="smbclient.1.html#minusU"><strong>-U</strong></a> option, by appending a percent symbol ("%")
then the password to username. For example, to attach to a service as
user <code>"fred"</code> with password <code>"secret"</code>, you would specify. <br>
<p><br><code>-U fred%secret</code><br>
<p><br>on the command line. Note that there are no spaces around the percent
symbol.
<p><br>If you specify the password as part of username then the <ahref="smbclient.1.html#minusN"><strong>-N</strong></a> option
(suppress password prompt) is assumed.
<p><br>If you specify the password as a parameter <em>AND</em> as part of username
then the password as part of username will take precedence. Putting
nothing before or nothing after the percent symbol will cause an empty
username or an empty password to be used, respectively.
<p><br>The password may also be specified by setting up an environment
variable called <code>PASSWORD</code> that contains the users password. Note
that this may be very insecure on some systems but on others allows
users to script smbclient commands without having a password appear in
the command line of a process listing.
<p><br>Note: Some servers (including OS/2 and Windows for Workgroups) insist
on an uppercase password. Lowercase or mixed case passwords may be
rejected by these servers.
<p><br>Be cautious about including passwords in scripts or in the
<code>PASSWORD</code> environment variable. Also, on many systems the command
line of a running process may be seen via the <code>ps</code> command to be
safe always allow smbclient to prompt for a password and type it in
directly.
<p><br><aname="minusL"></a>
<li><strong><strong>-L</strong></strong> This option allows you to look at what services are
available on a server. You use it as <code>"smbclient -L host"</code> and a
list should appear. The <ahref="smbclient.1.html#minusI"><strong>-I</strong></a> option may be useful if your NetBIOS
names don't match your tcp/ip dns host names or if you are trying to
reach a host on another network.
<p><br><aname="minust"></a>
<li><strong><strong>-t terminal code</strong></strong> This option tells smbclient how to interpret
filenames coming from the remote server. Usually Asian language
multibyte UNIX implementations use different character sets than
SMB/CIFS servers (<em>EUC</em> instead of <em>SJIS</em> for example). Setting
this parameter will let smbclient convert between the UNIX filenames
and the SMB filenames correctly. This option has not been seriously
tested and may have some problems.
<p><br>The terminal codes include <code>sjis</code>, <code>euc</code>, <code>jis7</code>, <code>jis8</code>,
<code>junet</code>, <code>hex</code>, <code>cap</code>. This is not a complete list, check the
Samba source code for the complete list.
<p><br><aname="minusm"></a>
<li><strong><strong>-m max protocol level</strong></strong> With the new code in Samba2.0,
<strong>smbclient</strong> allways attempts to connect at the maximum
protocols level the server supports. This parameter is
preserved for backwards compatibility, but any string
following the <strong>-m</strong> will be ignored.
<p><br><aname="minusW"></a>
<li><strong><strong>-W WORKGROUP</strong></strong> Override the default workgroup specified in the
<ahref="smb.conf.5.html#workgroup"><strong>workgroup</strong></a> parameter of the
<ahref="smb.conf.5.html"><strong>smb.conf</strong></a> file for this connection. This may
be needed to connect to some servers.
<p><br><aname="minusT"></a><li><strong><strong>-T tar options</strong></strong> smbclient may be used to create
<strong>tar (1)</strong> compatible backups of all the files on an SMB/CIFS
share. The secondary tar flags that can be given to this option are :
<p><br><ul>
<p><br><li><strong><strong>c</strong></strong> Create a tar file on UNIX. Must be followed by the
name of a tar file, tape device or <code>"-"</code> for standard output. If
using standard output you must turn the log level to its lowest value
<code>-d0</code> to avoid corrupting your tar file. This flag is
mutually exclusive with the <strong>x</strong> flag.
<p><br><li><strong><strong>x</strong></strong> Extract (restore) a local tar file back to a
share. Unless the <ahref="smbclient.1.html#minusD"><strong>-D</strong></a> option is given, the tar files will be
restored from the top level of the share. Must be followed by the name
of the tar file, device or <code>"-"</code> for standard input. Mutually exclusive
with the <strong>c</strong> flag. Restored files have theuir creation times (mtime)
set to the date saved in the tar file. Directories currently do not
get their creation dates restored properly.
<p><br><li><strong><strong>I</strong></strong> Include files and directories. Is the default
behaviour when filenames are specified above. Causes tar files to
be included in an extract or create (and therefore everything else to
be excluded). See example below. Filename globbing does not work for
included files for extractions (yet).
<p><br><li><strong><strong>X</strong></strong> Exclude files and directories. Causes tar files to
be excluded from an extract or create. See example below. Filename
globbing does not work for excluded files (yet).
<p><br><li><strong><strong>b</strong></strong> Blocksize. Must be followed by a valid (greater than
zero) blocksize. Causes tar file to be written out in
blocksize*TBLOCK (usually 512 byte) blocks.
<p><br><li><strong><strong>g</strong></strong> Incremental. Only back up files that have the
archive bit set. Useful only with the <strong>c</strong> flag.
<p><br><li><strong><strong>q</strong></strong> Quiet. Keeps tar from printing diagnostics as it
works. This is the same as tarmode quiet.
<p><br><li><strong><strong>N</strong></strong> Newer than. Must be followed by the name of a file
whose date is compared against files found on the share during a
create. Only files newer than the file specified are backed up to the
tar file. Useful only with the <strong>c</strong> flag.
<p><br><li><strong><strong>a</strong></strong> Set archive bit. Causes the archive bit to be reset
when a file is backed up. Useful with the <strong>g</strong> and <strong>c</strong> flags.
<p><br></ul>
<p><br><em>Tar Long File Names</em>
<p><br>smbclient's tar option now supports long file names both on backup and
restore. However, the full path name of the file must be less than
1024 bytes. Also, when a tar archive is created, smbclient's tar
option places all files in the archive with relative names, not
absolute names.
<p><br><em>Tar Filenames</em>
<p><br>All file names can be given as DOS path names (with <code>\</code> as the
component separator) or as UNIX path names (with <code>/</code> as the
component separator).
<p><br><em>Examples</em>
<p><br><ul>
<p><br><li> Restore from tar file backup.tar into myshare on mypc (no password on share).
<p><br><aname="help"></a><li><strong><strong>help [command]</strong></strong> See the <ahref="smbclient.1.html#questionmark"><strong>?</strong></a>
command above.
<p><br><aname="lcd"></a><li><strong><strong>lcd [directory name]</strong></strong> If "directory name" is
specified, the current working directory on the local machine will
be changed to the directory specified. This operation will fail if for
any reason the specified directory is inaccessible.
<p><br>If no directory name is specified, the name of the current working
directory on the local machine will be reported.
<p><br><aname="lowercase"></a><li><strong><strong>lowercase</strong></strong> Toggle lowercasing of filenames
for the <ahref="smbclient.1.html#get"><strong>get</strong></a> and <ahref="smbclient.1.html#mget"><strong>mget</strong></a> commands.
<p><br>When lowercasing is toggled ON, local filenames are converted to
lowercase when using the <ahref="smbclient.1.html#get"><strong>get</strong></a> and <ahref="smbclient.1.html#mget"><strong>mget</strong></a>
commands. This is often useful when copying (say) MSDOS files from a
server, because lowercase filenames are the norm on UNIX systems.
<p><br><aname="ls"></a><li><strong><strong>ls <mask></strong></strong> See the <ahref="smbclient.1.html#dir"><strong>dir</strong></a> command above.
<p><br><aname="mask"></a><li><strong><strong>mask <mask></strong></strong> This command allows the user to set
up a mask which will be used during recursive operation of the
<ahref="smbclient.1.html#mget"><strong>mget</strong></a> and <ahref="smbclient.1.html#mput"><strong>mput</strong></a> commands.
<p><br>The masks specified to the <ahref="smbclient.1.html#mget"><strong>mget</strong></a> and
<ahref="smbclient.1.html#mput"><strong>mput</strong></a> commands act as filters for directories rather
than files when recursion is toggled ON.
<p><br>The mask specified with the .B mask command is necessary to filter
files within those directories. For example, if the mask specified in
an <ahref="smbclient.1.html#mget"><strong>mget</strong></a> command is "source*" and the mask specified
with the mask command is "*.c" and recursion is toggled ON, the
<ahref="smbclient.1.html#mget"><strong>mget</strong></a> command will retrieve all files matching "*.c" in
all directories below and including all directories matching "source*"
in the current working directory.
<p><br>Note that the value for mask defaults to blank (equivalent to "*") and
remains so until the mask command is used to change it. It retains the
most recently specified value indefinitely. To avoid unexpected
results it would be wise to change the value of .I mask back to "*"
after using the <ahref="smbclient.1.html#mget"><strong>mget</strong></a> or <ahref="smbclient.1.html#mput"><strong>mput</strong></a> commands.
<p><br><aname="md"></a><li><strong><strong>md <directory name></strong></strong> See the <ahref="smbclient.1.html#mkdir"><strong>mkdir</strong></a>
command.
<p><br><aname="mget"></a><li><strong><strong>mget <mask></strong></strong> Copy all files matching mask from the
server to the machine running the client.
<p><br>Note that mask is interpreted differently during recursive operation
and non-recursive operation - refer to the <ahref="smbclient.1.html#recurse"><strong>recurse</strong></a>
and <ahref="smbclient.1.html#mask"><strong>mask</strong></a> commands for more information. Note that all
transfers in .B smbclient are binary. See also the