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.1249
1 files changed, 147 insertions, 102 deletions
diff --git a/docs/manpages/smbclient.1 b/docs/manpages/smbclient.1
index e0af67ca1a..22daaf4105 100644
--- a/docs/manpages/smbclient.1
+++ b/docs/manpages/smbclient.1
@@ -7,51 +7,51 @@ smbclient \- ftp-like Lan Manager client program
[
.B password
] [
-.B -A
+.B \-A
] [
-.B -E
+.B \-E
] [
-.B -L
+.B \-L
.I host
] [
-.B -M
+.B \-M
.I host
] [
-.B -I
+.B \-I
.I IP number
] [
-.B -N
+.B \-N
] [
-.B -P
+.B \-P
] [
-.B -U
+.B \-U
.I username
] [
-.B -d
+.B \-d
.I debuglevel
] [
-.B -l
+.B \-l
.I log basename
] [
-.B -n
+.B \-n
.I netbios name
] [
-.B -W
+.B \-W
.I workgroup
] [
-.B -O
+.B \-O
.I socket options
] [
-.B -p
+.B \-p
.I port number
] [
-.B -c
+.B \-c
.I command string
] [
-.B -T
+.B \-T
.I tar options
] [
-.B -D
+.B \-D
.I initial directory
]
.SH DESCRIPTION
@@ -62,10 +62,10 @@ is a client that can 'talk' to a Lan Manager server. It offers
an interface similar to that of the
.B ftp
program (see
-.B ftp(1)). Operations include things like getting files from the
+.BR ftp (1)).
+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 and so on.
-
.SH OPTIONS
.B servicename
.RS 3
@@ -95,16 +95,16 @@ be the same as the hostname of the machine running the server.
password
is the password required to access the specified service on the
specified server. If supplied, the
-.B -N
+.B \-N
option (suppress password prompt) is assumed.
There is no default password. If no password is supplied on the command line
(either here or using the
-.B -U
+.B \-U
option (see below)) and
-.B -N
+.B \-N
is not specified, the client will prompt for a password, even if the desired
-service does not require one. (If prompted for a password and none is
+service does not require one. (If no password is
required, simply press ENTER to provide a null password.)
Note: Some servers (including OS/2 and Windows for Workgroups) insist
@@ -114,7 +114,7 @@ rejected by these servers.
Be cautious about including passwords in scripts.
.RE
-.B -A
+.B \-A
.RS 3
This parameter, if specified, causes the maximum debug level to be selected.
@@ -123,21 +123,23 @@ a security issue involved, as at the maximum debug level cleartext passwords
may be written to some log files.
.RE
-.B -L
+.B \-L
.RS 3
This option allows you to look at what services are available on a
server. You use it as "smbclient -L host" and a list should appear.
-The -I option may be useful if your netbios names don't match your
+The
+.B \-I
+option may be useful if your netbios names don't match your
tcp/ip host names or if you are trying to reach a host on another
network. For example:
smbclient -L ftp -I ftp.microsoft.com
-will list the shares available on microsofts public server.
+will list the shares available on Microsoft's public server.
.RE
-.B -M
+.B \-M
.RS 3
This options allows you to send messages, using the "WinPopup"
@@ -151,22 +153,30 @@ message will be lost, and no error message will occur.
The message is also automatically truncated if the message is over
1600 bytes, as this is the limit of the protocol.
-One useful trick is to cat the message through smbclient. For example:
+One useful trick is to cat the message through
+.BR smbclient .
+For example:
cat mymessage.txt | smbclient -M FRED
will send the message in the file "mymessage.txt" to the machine FRED.
-You may also find the -U and -I options useful, as they allow you to
+You may also find the
+.B \-U
+and
+.B \-I
+options useful, as they allow you to
control the FROM and TO parts of the message.
-Samba currently has no way of receiving WinPopup messages.
+See the message command section of
+.BR smb.conf (5)
+for a description of how to handle incoming WinPopup messages in Samba.
Note: Copy WinPopup into the startup group on your WfWg PCs if you
want them to always be able to receive messages.
.RE
-.B -E
+.B \-E
.RS 3
This parameter, if specified, causes the client to write messages to the
@@ -176,7 +186,7 @@ By default, the client writes messages to standard output - typically the
user's tty.
.RE
-.B -I
+.B \-I
.I IP number
.RS 3
@@ -193,7 +203,7 @@ There is no default for this parameter. If not supplied, it will be determined
automatically by the client as described above.
.RE
-.B -N
+.B \-N
.RS 3
If specified, this parameter suppresses the normal password prompt from the
@@ -204,14 +214,16 @@ Unless a password is specified on the command line or this parameter is
specified, the client will request a password.
.RE
-.B -O
+.B \-O
.I socket options
-.RS 3
-
-See the socket options section of smb.conf(5) for details
+.RS 3
+See the socket options section of
+.BR smb.conf (5)
+for details.
.RE
-.B -P
+
+.B \-P
.RS 3
If specified, the service requested will be connected to as a printer service
@@ -221,7 +233,7 @@ will not be applicable for such a connection.
By default, services will be connected to as NON-printer services.
.RE
-.B -U
+.B \-U
.I username
.RS 3
@@ -247,19 +259,19 @@ be empty.
If the service you are connecting to requires a password, it can be supplied
using the
-.B -U
+.B \-U
option, by appending a percent symbol ("%") then the password to
.I username.
For example, to attach to a service as user "fred" with password "secret", you
would specify
-.B -U
+.B \-U
.I fred%secret
on the command line. Note that there are no spaces around the percent symbol.
If you specify the password as part of
.I username
then the
-.B -N
+.B \-N
option (suppress password prompt) is assumed.
If you specify the password as a parameter AND as part of
@@ -277,10 +289,10 @@ rejected by these servers.
Be cautious about including passwords in scripts.
.RE
-.B -d
+.B \-d
.I debuglevel
-.RS 3
+.RS 3
debuglevel is an integer from 0 to 5.
The default value if this parameter is not specified is zero.
@@ -296,7 +308,7 @@ use only by developers and generate HUGE amounts of log data, most of which
is extremely cryptic.
.RE
-.B -l
+.B \-l
.I log basename
.RS 3
@@ -320,9 +332,8 @@ log.client.out (containing outbound transaction data)
The log files generated are never removed by the client.
.RE
-.RE
-.B -n
+.B \-n
.I netbios name
.RS 3
@@ -331,7 +342,7 @@ uppercase) as its netbios name. This parameter allows you to override
the host name and use whatever netbios name you wish.
.RE
-.B -W
+.B \-W
.I workgroup
.RS 3
@@ -339,10 +350,10 @@ Override what workgroup is used for the connection. This may be needed
to connect to some servers.
.RE
-.B -p
+.B \-p
.I port number
-.RS 3
+.RS 3
port number is a positive integer value.
The default value if this parameter is not specified is 139.
@@ -352,12 +363,25 @@ the server. The standard (well-known) port number for the server is 139,
hence the default.
This parameter is not normally specified.
+.RE
-.B -T
+.B \-T
.I tar options
-.RS3
-where tar options are one or more of c,x,I,X,b,g,N or a; used as:
+.RS 3
+where
+.I tar options
+consists of one or more of
+.BR c ,
+.BR x ,
+.BR I ,
+.BR X ,
+.BR b ,
+.BR g ,
+.BR N
+or
+.BR a ;
+used as:
.LP
smbclient
.B "\\\\\\\\server\\\\share"
@@ -373,18 +397,25 @@ smbclient
.IR filenames....
]
-.RS3
+.RS 3
.B c
Create a tar file on UNIX. Must be followed by the name of a tar file,
-tape device or "-" for standard output. (May be useful to set debugging
-low (-d0)) to avoid corrupting your tar file if using "-"). Mutually
-exclusive with the x flag.
+tape device or "\-" for standard output. (May be useful to set debugging
+low
+.RB ( -d0 ))
+to avoid corrupting your tar file if using "\-"). Mutually
+exclusive with the
+.B x
+flag.
.B x
-Extract (restore) a local tar file back to a share. Unless the -D
+Extract (restore) a local tar file back to a share. Unless the
+.B \-D
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 "-"
-for standard input. Mutually exclusive with the c flag.
+the share. Must be followed by the name of the tar file, device or "\-"
+for standard input. Mutually exclusive with the
+.B c
+flag.
.B I
Include files and directories. Is the default behaviour when
@@ -405,17 +436,25 @@ blocks.
.B g
Incremental. Only back up files that have the archive bit set. Useful
-only with the c flag.
+only with the
+.B c
+flag.
.B N
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 c flag.
+only with the
+.B c
+flag.
.B a
Set archive bit. Causes the archive bit to be reset when a file is backed
-up. Useful with the g (and c) flags.
+up. Useful with the
+.B g
+(and
+.BR c )
+flags.
.LP
.B Examples
@@ -431,33 +470,32 @@ Restore everything except users/docs
smbclient \\\\mypc\\myshare "" -N -Tc backup.tar users/docs
Create a tar file of the files beneath users/docs.
-
+.RE
.RE
-.B -D
+.B \-D
.I initial directory
-.RS3
-
+.RS 3
Change to initial directory before starting. Probably only of any use
-with the tar (\-T) option.
-
-
+with the tar
+.RB ( \-T )
+option.
.RE
-.B -c
+.B \-c
.I command string
.RS 3
-
command string is a semicolon separated list of commands to be
-executed instead of prompting from stdin. -N is implied by -c.
+executed instead of prompting from stdin.
+.B \-N
+is implied by
+.BR \-c .
This is particularly useful in scripts and for printing stdin to
-the server, e.g. -c 'print -'.
-
+the server, e.g. \-c 'print \-'.
.RE
-
.SH OPERATIONS
Once the client is running, the user is presented with a prompt, "smb: \\>".
The backslash ("\\") indicates the current working directory on the server,
@@ -602,7 +640,9 @@ Copy the file called
from the server to the machine running the client. If specified, name the
local copy
.I local file name.
-Note that all transfers in smbclient are binary. See also the
+Note that all transfers in
+.B smbclient
+are binary. See also the
.B lowercase
command.
.RE
@@ -666,7 +706,7 @@ when using the
and
.B mget
commands. This is often useful when copying (say) MSDOS files from a server,
-because lowercase filenames are the norm on Unix systems.
+because lowercase filenames are the norm on UNIX systems.
.RE
.RE
@@ -776,8 +816,9 @@ operation - refer to the
.B recurse
and
.B mask
-commands for more information. Note that all transfers in smbclient are
-binary. See also the
+commands for more information. Note that all transfers in
+.B smbclient
+are binary. See also the
.B lowercase
command.
.RE
@@ -820,8 +861,9 @@ operation - refer to the
.B recurse
and
.B mask
-commands for more information. Note that all transfers in smbclient are
-binary.
+commands for more information. Note that all transfers in
+.B smbclient
+are binary.
.RE
.RE
@@ -895,7 +937,9 @@ Copy the file called
from the machine running the client to the server. If specified, name the
remote copy
.I remote file name.
-Note that all transfers in smbclient are binary. See also the
+Note that all transfers in
+.B smbclient
+are binary. See also the
.B lowercase
command.
.RE
@@ -966,7 +1010,7 @@ directory (ie., the directory they are copying
files that match the mask specified using the
.B mask
command will be retrieved. See also the
-.mask
+.B mask
command.
When recursion is toggled OFF, only files from the current working
@@ -1019,11 +1063,13 @@ Remove the specified directory (user access privileges permitting)
.RE
.B Description:
.RS 3
-Performs a tar operation - see -T command line option above. Behaviour
+Performs a tar operation - see the
+.B \-T
+command line option above. Behaviour
may be affected by the
.B tarmode
-command (see below). Using the g (incremental) and N (newer) will affect
-tarmode settings. Note that using the "-" option with tar x may not
+command (see below). Using g (incremental) and N (newer) will affect
+tarmode settings. Note that using the "\-" option with tar x may not
work - use the command line option instead.
.RE
.RE
@@ -1064,7 +1110,7 @@ on all files it backs up (implies read/write share).
.RS 3
.B Parameters
.RS 3
-.I <filename> <perm=[+|-]rsha>
+.I <filename> <perm=[+|\-]rsha>
.RE
.B Description
@@ -1076,14 +1122,13 @@ setmode myfile +r
would make myfile read only.
.RE
.RE
-
.SH NOTES
Some servers are fussy about the case of supplied usernames, passwords, share
names (aka service names) and machine names. If you fail to connect try
giving all parameters in uppercase.
It is often necessary to use the
-.B -n
+.B \-n
option when connecting to some types
of servers. For example OS/2 LanManager insists on a valid netbios name
being used, so you need to supply a valid name that would be known to
@@ -1092,10 +1137,8 @@ the server.
.B smbclient
supports long file names where the server supports the LANMAN2
protocol.
-
.SH FILES
Not applicable.
-
.SH ENVIRONMENT VARIABLES
.B USER
.RS 3
@@ -1103,12 +1146,12 @@ The variable USER may contain the username of the person using the client.
This information is used only if the protocol level is high enough to support
session-level passwords.
.RE
-
.SH INSTALLATION
The location of the client program is a matter for individual system
administrators. The following are thus suggestions only.
-It is recommended that the client software be installed under the /usr/local
+It is recommended that the client software be installed under the
+/usr/local/samba
hierarchy, in a directory readable by all, writeable only by root. The client
program itself should be executable by all. The client should NOT be setuid
or setgid!
@@ -1117,8 +1160,11 @@ The client log files should be put in a directory readable and writable only
by the user.
To test the client, you will need to know the name of a running Lan manager
-server. It is possible to run the smbd (see
-.B smbd(8)) as an ordinary user - running that server as a daemon on a
+server. It is possible to run
+.B smbd
+(see
+.BR smbd (8))
+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 VERSION
@@ -1129,8 +1175,7 @@ the client has extensions or parameter semantics that differ from or are not
covered by this man page. Please notify these to the address below for
rectification.
.SH SEE ALSO
-.B smbd(8)
-
+.BR smbd (8)
.SH DIAGNOSTICS
[This section under construction]
@@ -1147,7 +1192,6 @@ creation of this man page the source code is still too fluid to warrant
describing each and every diagnostic. At this stage your best bet is still
to grep the source code and inspect the conditions that gave rise to the
diagnostics you are seeing.
-
.SH BUGS
None known.
.SH CREDITS
@@ -1155,8 +1199,9 @@ The original Samba software and related utilities were created by
Andrew Tridgell (samba-bugs@anu.edu.au). Andrew is also the Keeper
of the Source for this project.
-This man page written by Karl Auer (Karl.Auer@anu.edu.au)
+This man page was written by Karl Auer (Karl.Auer@anu.edu.au).
See
-.B smb.conf(5) for a full list of contributors and details on how to
+.BR smb.conf (5)
+for a full list of contributors and details on how to
submit bug reports, comments etc.