summaryrefslogtreecommitdiff
path: root/docs/manpages/smbclient.1
diff options
context:
space:
mode:
Diffstat (limited to 'docs/manpages/smbclient.1')
-rw-r--r--docs/manpages/smbclient.1284
1 files changed, 137 insertions, 147 deletions
diff --git a/docs/manpages/smbclient.1 b/docs/manpages/smbclient.1
index 6ba48185a3..e5785acaf5 100644
--- a/docs/manpages/smbclient.1
+++ b/docs/manpages/smbclient.1
@@ -3,21 +3,20 @@
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "SMBCLIENT" "1" "24 March 2003" "" ""
-
+.TH "SMBCLIENT" "1" "04 March 2003" "" ""
.SH NAME
smbclient \- ftp-like client to access SMB/CIFS resources on servers
.SH SYNOPSIS
-\fBsmbclient\fR \fBservicename\fR [ \fBpassword\fR ] [ \fB-b <buffer size>\fR ] [ \fB-d debuglevel\fR ] [ \fB-D Directory\fR ] [ \fB-U username\fR ] [ \fB-W workgroup\fR ] [ \fB-M <netbios name>\fR ] [ \fB-m maxprotocol\fR ] [ \fB-A authfile\fR ] [ \fB-N\fR ] [ \fB-l logfile\fR ] [ \fB-L <netbios name>\fR ] [ \fB-I destinationIP\fR ] [ \fB-E\fR ] [ \fB-c <command string>\fR ] [ \fB-i scope\fR ] [ \fB-O <socket options>\fR ] [ \fB-p port\fR ] [ \fB-R <name resolve order>\fR ] [ \fB-s <smb config file>\fR ] [ \fB-T<c|x>IXFqgbNan\fR ] [ \fB-k\fR ]
+\fBsmbclient\fR \fBservicename\fR [ \fBpassword\fR ] [ \fB-b <buffer size>\fR ] [ \fB-d debuglevel\fR ] [ \fB-D Directory\fR ] [ \fB-U username\fR ] [ \fB-W workgroup\fR ] [ \fB-M <netbios name>\fR ] [ \fB-m maxprotocol\fR ] [ \fB-A authfile\fR ] [ \fB-N\fR ] [ \fB-l logfile\fR ] [ \fB-L <netbios name>\fR ] [ \fB-I destinationIP\fR ] [ \fB-E\fR ] [ \fB-c <command string>\fR ] [ \fB-i scope\fR ] [ \fB-O <socket options>\fR ] [ \fB-p port\fR ] [ \fB-R <name resolve order>\fR ] [ \fB-s <smb config file>\fR ] [ \fB-T<c|x>IXFqgbNan\fR ]
.SH "DESCRIPTION"
.PP
-This tool is part of the \fBSamba\fR(7) suite.
+This tool is part of the Samba suite.
.PP
\fBsmbclient\fR is a client that can
\&'talk' to an SMB/CIFS server. It offers an interface
-similar to that of the ftp program (see \fBftp\fR(1)).
+similar to that of the ftp program (see \fBftp(1)\fR).
Operations include things like getting files from the server
to the local machine, putting files from the local machine to
the server, retrieving directory information from the server
@@ -42,8 +41,7 @@ same as the IP hostname of the machine running the server.
The server name is looked up according to either
the \fI-R\fR parameter to \fBsmbclient\fR or
-using the name resolve order parameter in
-the \fBsmb.conf\fR(5) file,
+using the name resolve order parameter in the \fIsmb.conf\fR file,
allowing an administrator to change the order and methods
by which server names are looked up.
.TP
@@ -67,6 +65,15 @@ or mixed case passwords may be rejected by these servers.
Be cautious about including passwords in scripts.
.TP
+\fB-s smb.conf\fR
+Specifies the location of the all important
+\fIsmb.conf\fR file.
+.TP
+\fB-O socket options\fR
+TCP socket options to set on the client
+socket. See the socket options parameter in the \fI smb.conf (5)\fR manpage for the list of valid
+options.
+.TP
\fB-R <name resolve order>\fR
This option is used by the programs in the Samba
suite to determine what naming services and in what order to resolve
@@ -74,18 +81,17 @@ host names to IP addresses. The option takes a space-separated
string of different name resolution options.
The options are :"lmhosts", "host", "wins" and "bcast". They
-cause names to be resolved as follows:
+cause names to be resolved as follows :
.RS
.TP 0.2i
\(bu
-lmhosts: Lookup an IP
+lmhosts : Lookup an IP
address in the Samba lmhosts file. If the line in lmhosts has
-no name type attached to the NetBIOS name (see
-the \fBlmhosts\fR(5) for details) then
+no name type attached to the NetBIOS name (see the lmhosts(5) for details) then
any name type matches for lookup.
.TP 0.2i
\(bu
-host: Do a standard host
+host : Do a standard host
name to IP address resolution, using the system \fI/etc/hosts
\fR, NIS, or DNS lookups. This method of name resolution
is operating system dependent, for instance on IRIX or Solaris this
@@ -95,13 +101,13 @@ type being queried is the 0x20 (server) name type, otherwise
it is ignored.
.TP 0.2i
\(bu
-wins: Query a name with
+wins : Query a name with
the IP address listed in the \fIwins server\fR
parameter. If no WINS server has
been specified this method will be ignored.
.TP 0.2i
\(bu
-bcast: Do a broadcast on
+bcast : Do a broadcast on
each of the known local interfaces listed in the
\fIinterfaces\fR
parameter. This is the least reliable of the name resolution
@@ -110,12 +116,12 @@ connected subnet.
.RE
If this parameter is not set then the name resolve order
-defined in the \fBsmb.conf\fR(5) file parameter
+defined in the \fIsmb.conf\fR file parameter
(name resolve order) will be used.
The default order is lmhosts, host, wins, bcast and without
this parameter or any entry in the \fIname resolve order
-\fR parameter of the \fBsmb.conf\fR(5) file the name resolution
+\fR parameter of the \fIsmb.conf\fR file the name resolution
methods will be attempted in this order.
.TP
\fB-M NetBIOS name\fR
@@ -141,13 +147,64 @@ You may also find the \fI-U\fR and
\fI-I\fR options useful, as they allow you to
control the FROM and TO parts of the message.
-See the \fImessage command\fR parameter in the \fBsmb.conf\fR(5) for a description of how to handle incoming
+See the message command parameter in the \fI smb.conf(5)\fR for a description of how to handle incoming
WinPopup messages in Samba.
\fBNote\fR: Copy WinPopup into the startup group
on your WfWg PCs if you want them to always be able to receive
messages.
.TP
+\fB-i scope\fR
+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 \fIrfc1001.txt\fR
+and \fIrfc1002.txt\fR.
+NetBIOS scopes are \fBvery\fR rarely used, only set
+this parameter if you are the system administrator in charge of all
+the NetBIOS systems you communicate with.
+.TP
+\fB-N\fR
+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.
+
+Unless a password is specified on the command line or
+this parameter is specified, the client will request a
+password.
+.TP
+\fB-n NetBIOS name\fR
+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.
+.TP
+\fB-d debuglevel\fR
+\fIdebuglevel\fR is an integer from 0 to 10, or
+the letter 'A'.
+
+The default value if this parameter is not specified
+is zero.
+
+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.
+
+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 \fIdebuglevel\fR is set to the letter 'A', then \fBall
+\fR debug messages will be printed. This setting
+is for developers only (and people who \fBreally\fR want
+to know how the code works internally).
+
+Note that specifying this parameter here will override
+the log level parameter in the \fIsmb.conf (5)\fR
+file.
+.TP
\fB-p port\fR
This number is the TCP port number that will be used
when making connections to the server. The standard (well-known)
@@ -167,8 +224,8 @@ would be \fIlog.client\fR.
The log file generated is never removed by the client.
.TP
-\fB-h|--help\fR
-Print a summary of command line options.
+\fB-h\fR
+Print the usage message for the client.
.TP
\fB-I IP-address\fR
\fIIP address\fR is the address of the server to connect to.
@@ -194,6 +251,53 @@ output stream.
By default, the client writes messages to standard output
- typically the user's tty.
.TP
+\fB-U username[%pass]\fR
+Sets the SMB username or username and password.
+If %pass is not specified, The user will be prompted. The client
+will first check the \fBUSER\fR environment variable, then the
+\fBLOGNAME\fR variable and if either exists, the
+string is uppercased. Anything in these variables following a '%'
+sign will be treated as the password. If these environment
+variables are not found, the username GUEST
+is used.
+
+If the password is not included in these environment
+variables (using the %pass syntax), \fBsmbclient\fR will look for
+a \fBPASSWD\fR environment variable from which
+to read the password.
+
+A third option is to use a credentials file which
+contains the plaintext of the domain name, username and password. This
+option is mainly provided for scripts where the admin doesn't
+wish to pass the credentials on the command line or via environment
+variables. If this method is used, make certain that the permissions
+on the file restrict access from unwanted users. See the
+\fI-A\fR for more details.
+
+Be cautious about including passwords in scripts or in
+the \fBPASSWD\fR environment variable. Also, on
+many systems the command line of a running process may be seen
+via the \fBps\fR command to be safe always allow
+\fBsmbclient\fR to prompt for a password and type
+it in directly.
+.TP
+\fB-A filename\fR
+This option allows
+you to specify a file from which to read the username, domain name, and
+password used in the connection. The format of the file is
+
+
+.nf
+username = <value>
+password = <value>
+domain = <value>
+
+.fi
+
+If the domain parameter is missing the current workgroup name
+is used instead. Make certain that the permissions on the file restrict
+access from unwanted users.
+.TP
\fB-L\fR
This option allows you to look at what services
are available on a server. You use it as \fBsmbclient -L
@@ -221,127 +325,11 @@ size when getting or putting a file from/to the server. The default
is 65520 bytes. Setting this value smaller (to 1200 bytes) has been
observed to speed up file transfers to and from a Win9x server.
.TP
-\fB-V\fR
-Prints the version number for
-\fBsmbd\fR.
-.TP
-\fB-s <configuration file>\fR
-The file specified contains the
-configuration details required by the server. The
-information in this file includes server-specific
-information such as what printcap file to use, as well
-as descriptions of all the services that the server is
-to provide. See \fIsmb.conf(5)\fR for more information.
-The default configuration file name is determined at
-compile time.
-.TP
-\fB-d|--debug=debuglevel\fR
-\fIdebuglevel\fR is an integer
-from 0 to 10. The default value if this parameter is
-not specified is zero.
-
-The higher this value, the more detail will be
-logged to the log files about the activities of the
-server. 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.
-
-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.
-
-Note that specifying this parameter here will
-override the log
-level file.
-.TP
-\fB-l|--logfile=logbasename\fR
-File name for log/debug files. The extension
-".client" will be appended. The log file is
-never removed by the client.
-.TP
-\fB-N\fR
-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.
-
-Unless a password is specified on the command line or
-this parameter is specified, the client will request a
-password.
-.TP
-\fB-k\fR
-Try to authenticate with kerberos. Only useful in
-an Active Directory environment.
-.TP
-\fB-A|--authfile=filename\fR
-This option allows
-you to specify a file from which to read the username and
-password used in the connection. The format of the file is
-
-
-.nf
-username = <value>
-password = <value>
-domain = <value>
-.fi
-
-Make certain that the permissions on the file restrict
-access from unwanted users.
-.TP
-\fB-U|--user=username[&%;password]\fR
-Sets the SMB username or username and password.
-
-If &%;password is not specified, the user will be prompted. The
-client will first check the \fBUSER\fR environment variable, then the
-\fBLOGNAME\fR variable and if either exists, the
-string is uppercased. If these environmental variables are not
-found, the username GUEST is used.
-
-A third option is to use a credentials file which
-contains the plaintext of the username and password. This
-option is mainly provided for scripts where the admin does not
-wish to pass the credentials on the command line or via environment
-variables. If this method is used, make certain that the permissions
-on the file restrict access from unwanted users. See the
-\fI-A\fR for more details.
-
-Be cautious about including passwords in scripts. Also, on
-many systems the command line of a running process may be seen
-via the \fBps\fR command. To be safe always allow
-\fBrpcclient\fR to prompt for a password and type
-it in directly.
-.TP
-\fB-n <primary NetBIOS name>\fR
-This option allows you to override
-the NetBIOS name that Samba uses for itself. This is identical
-to setting the \fINetBIOS
-name\fR parameter in the \fBsmb.conf\fR(5) file. However, a command
-line setting will take precedence over settings in
-\fBsmb.conf\fR(5).
-.TP
-\fB-i <scope>\fR
-This specifies a NetBIOS scope that
-\fBnmblookup\fR 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
-\fBvery\fR rarely used, only set this parameter
-if you are the system administrator in charge of all the
-NetBIOS systems you communicate with.
-.TP
-\fB-W|--workgroup=domain\fR
-Set the SMB domain of the username. This
-overrides the default domain which is the domain defined in
-smb.conf. If the domain specified is the same as the servers
-NetBIOS name, it causes the client to log on using the servers local
-SAM (as opposed to the Domain SAM).
-.TP
-\fB-O socket options\fR
-TCP socket options to set on the client
-socket. See the socket options parameter in
-the \fBsmb.conf\fR(5) manual page for the list of valid
-options.
+\fB-W WORKGROUP\fR
+Override the default workgroup (domain) specified
+in the workgroup parameter of the \fIsmb.conf\fR
+file for this connection. This may be needed to connect to some
+servers.
.TP
\fB-T tar options\fR
smbclient may be used to create \fBtar(1)
@@ -425,7 +413,7 @@ files in the archive with relative names, not absolute names.
\fBTar Filenames\fR
-All file names can be given as DOS path names (with '\\\\'
+All file names can be given as DOS path names (with '\\'
as the component separator) or as UNIX path names (with '/' as
the component separator).
@@ -476,7 +464,7 @@ a prompt :
.PP
smb:\\>
.PP
-The backslash ("\\\\") indicates the current working directory
+The backslash ("\\") indicates the current working directory
on the server, and will change if the current working directory
is changed.
.PP
@@ -778,7 +766,8 @@ The client log files should be put in a directory readable
and writeable only by the user.
.PP
To test the client, you will need to know the name of a
-running SMB/CIFS server. It is possible to run \fBsmbd\fR(8) as an ordinary user - running that server as a daemon
+running SMB/CIFS server. It is possible to run \fBsmbd(8)
+\fR as an ordinary user - running that server as a daemon
on a user-accessible port (typically any port number over 1024)
would provide a suitable test server.
.SH "DIAGNOSTICS"
@@ -792,7 +781,8 @@ on the debug level used by the client. If you have problems,
set the debug level to 3 and peruse the log files.
.SH "VERSION"
.PP
-This man page is correct for version 2.2 of the Samba suite.
+This man page is correct for version 2.2 of
+the Samba suite.
.SH "AUTHOR"
.PP
The original Samba software and related utilities
@@ -802,7 +792,7 @@ to the way the Linux kernel is developed.
.PP
The original Samba man pages were written by Karl Auer.
The man page sources were converted to YODL format (another
-excellent piece of Open Source software, available at ftp://ftp.icce.rug.nl/pub/unix/ <URL:ftp://ftp.icce.rug.nl/pub/unix/>) and updated for the Samba 2.0
+excellent piece of Open Source software, available at
+ftp://ftp.icce.rug.nl/pub/unix/ <URL:ftp://ftp.icce.rug.nl/pub/unix/>) and updated for the Samba 2.0
release by Jeremy Allison. The conversion to DocBook for
-Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 for Samba 3.0
-was done by Alexander Bokovoy.
+Samba 2.2 was done by Gerald Carter