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.1268
1 files changed, 51 insertions, 217 deletions
diff --git a/docs/manpages/smbclient.1 b/docs/manpages/smbclient.1
index 5a61ec64e7..df8f429d40 100644
--- a/docs/manpages/smbclient.1
+++ b/docs/manpages/smbclient.1
@@ -1,161 +1,13 @@
+'\" t
.\" Title: smbclient
.\" Author: [see the "AUTHOR" section]
-.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
-.\" Date: 06/18/2010
+.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
+.\" Date: 03/06/2011
.\" Manual: User Commands
.\" Source: Samba 3.5
.\" Language: English
.\"
-.TH "SMBCLIENT" "1" "06/18/2010" "Samba 3\&.5" "User Commands"
-.\" -----------------------------------------------------------------
-.\" * (re)Define some macros
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" toupper - uppercase a string (locale-aware)
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.de toupper
-.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
-\\$*
-.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
-..
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" SH-xref - format a cross-reference to an SH section
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.de SH-xref
-.ie n \{\
-.\}
-.toupper \\$*
-.el \{\
-\\$*
-.\}
-..
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" SH - level-one heading that works better for non-TTY output
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.de1 SH
-.\" put an extra blank line of space above the head in non-TTY output
-.if t \{\
-.sp 1
-.\}
-.sp \\n[PD]u
-.nr an-level 1
-.set-an-margin
-.nr an-prevailing-indent \\n[IN]
-.fi
-.in \\n[an-margin]u
-.ti 0
-.HTML-TAG ".NH \\n[an-level]"
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-\." make the size of the head bigger
-.ps +3
-.ft B
-.ne (2v + 1u)
-.ie n \{\
-.\" if n (TTY output), use uppercase
-.toupper \\$*
-.\}
-.el \{\
-.nr an-break-flag 0
-.\" if not n (not TTY), use normal case (not uppercase)
-\\$1
-.in \\n[an-margin]u
-.ti 0
-.\" if not n (not TTY), put a border/line under subheading
-.sp -.6
-\l'\n(.lu'
-.\}
-..
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" SS - level-two heading that works better for non-TTY output
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.de1 SS
-.sp \\n[PD]u
-.nr an-level 1
-.set-an-margin
-.nr an-prevailing-indent \\n[IN]
-.fi
-.in \\n[IN]u
-.ti \\n[SN]u
-.it 1 an-trap
-.nr an-no-space-flag 1
-.nr an-break-flag 1
-.ps \\n[PS-SS]u
-\." make the size of the head bigger
-.ps +2
-.ft B
-.ne (2v + 1u)
-.if \\n[.$] \&\\$*
-..
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" BB/BE - put background/screen (filled box) around block of text
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.de BB
-.if t \{\
-.sp -.5
-.br
-.in +2n
-.ll -2n
-.gcolor red
-.di BX
-.\}
-..
-.de EB
-.if t \{\
-.if "\\$2"adjust-for-leading-newline" \{\
-.sp -1
-.\}
-.br
-.di
-.in
-.ll
-.gcolor
-.nr BW \\n(.lu-\\n(.i
-.nr BH \\n(dn+.5v
-.ne \\n(BHu+.5v
-.ie "\\$2"adjust-for-leading-newline" \{\
-\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
-.\}
-.el \{\
-\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
-.\}
-.in 0
-.sp -.5v
-.nf
-.BX
-.in
-.sp .5v
-.fi
-.\}
-..
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" BM/EM - put colored marker in margin next to block of text
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.de BM
-.if t \{\
-.br
-.ll -2n
-.gcolor red
-.di BX
-.\}
-..
-.de EM
-.if t \{\
-.br
-.di
-.ll
-.gcolor
-.nr BH \\n(dn
-.ne \\n(BHu
-\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
-.in 0
-.nf
-.BX
-.in
-.fi
-.\}
-..
+.TH "SMBCLIENT" "1" "03/06/2011" "Samba 3\&.5" "User Commands"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
@@ -166,24 +18,20 @@
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
-.SH "Name"
+.SH "NAME"
smbclient \- ftp\-like client to access SMB/CIFS resources on servers
-.SH "Synopsis"
-.fam C
+.SH "SYNOPSIS"
.HP \w'\ 'u
-\FCsmbclient\F[] [\-b\ <buffer\ size>] [\-d\ debuglevel] [\-e] [\-L\ <netbios\ name>] [\-U\ username] [\-I\ destinationIP] [\-M\ <netbios\ name>] [\-m\ maxprotocol] [\-A\ authfile] [\-N] [\-C] [\-g] [\-i\ scope] [\-O\ <socket\ options>] [\-p\ port] [\-R\ <name\ resolve\ order>] [\-s\ <smb\ config\ file>] [\-k] [\-P] [\-c\ <command>]
-.fam
-.fam C
+smbclient [\-b\ <buffer\ size>] [\-d\ debuglevel] [\-e] [\-L\ <netbios\ name>] [\-U\ username] [\-I\ destinationIP] [\-M\ <netbios\ name>] [\-m\ maxprotocol] [\-A\ authfile] [\-N] [\-C] [\-g] [\-i\ scope] [\-O\ <socket\ options>] [\-p\ port] [\-R\ <name\ resolve\ order>] [\-s\ <smb\ config\ file>] [\-k] [\-P] [\-c\ <command>]
.HP \w'\ 'u
-\FCsmbclient\F[] {servicename} [password] [\-b\ <buffer\ size>] [\-d\ debuglevel] [\-e] [\-D\ Directory] [\-U\ username] [\-W\ workgroup] [\-M\ <netbios\ name>] [\-m\ maxprotocol] [\-A\ authfile] [\-N] [\-C] [\-g] [\-l\ log\-basename] [\-I\ destinationIP] [\-E] [\-c\ <command\ string>] [\-i\ scope] [\-O\ <socket\ options>] [\-p\ port] [\-R\ <name\ resolve\ order>] [\-s\ <smb\ config\ file>] [\-T<c|x>IXFqgbNan] [\-k]
-.fam
+smbclient {servicename} [password] [\-b\ <buffer\ size>] [\-d\ debuglevel] [\-e] [\-D\ Directory] [\-U\ username] [\-W\ workgroup] [\-M\ <netbios\ name>] [\-m\ maxprotocol] [\-A\ authfile] [\-N] [\-C] [\-g] [\-l\ log\-basename] [\-I\ destinationIP] [\-E] [\-c\ <command\ string>] [\-i\ scope] [\-O\ <socket\ options>] [\-p\ port] [\-R\ <name\ resolve\ order>] [\-s\ <smb\ config\ file>] [\-T<c|x>IXFqgbNan] [\-k]
.SH "DESCRIPTION"
.PP
This tool is part of the
\fBsamba\fR(7)
suite\&.
.PP
-\FCsmbclient\F[]
+smbclient
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))\&. 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"
@@ -191,20 +39,20 @@ is a client that can \'talk\' to an SMB/CIFS server\&. It offers an interface si
servicename
.RS 4
servicename is the name of the service you want to use on the server\&. A service name takes the form
-\FC//server/service\F[]
+//server/service
where
\fIserver \fR
is the NetBIOS name of the SMB/CIFS server offering the desired service and
\fIservice\fR
is the name of the service offered\&. Thus to connect to the service "printer" on the SMB/CIFS server "smbserver", you would use the servicename
-\FC//smbserver/printer \F[]
+//smbserver/printer
.sp
Note that the server name required is NOT necessarily the IP (DNS) host name of the server ! The name required is a NetBIOS server name, which may or may not be the same as the IP hostname of the machine running the server\&.
.sp
The server name is looked up according to either the
\fI\-R\fR
parameter to
-\FCsmbclient\F[]
+smbclient
or using the name resolve order parameter in the
\fBsmb.conf\fR(5)
file, allowing an administrator to change the order and methods by which server names are looked up\&.
@@ -255,8 +103,8 @@ for details) then any name type matches for lookup\&.
.IP \(bu 2.3
.\}
\fBhost\fR: Do a standard host name to IP address resolution, using the system
-\FC/etc/hosts \F[], NIS, or DNS lookups\&. This method of name resolution is operating system dependent, for instance on IRIX or Solaris this may be controlled by the
-\FC/etc/nsswitch\&.conf\F[]
+/etc/hosts, NIS, or DNS lookups\&. This method of name resolution is operating system dependent, for instance on IRIX or Solaris this may be controlled by the
+/etc/nsswitch\&.conf
file)\&. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\&.
.RE
.sp
@@ -306,8 +154,8 @@ If the receiving computer is running WinPopup the user will receive the message
The message is also automatically truncated if the message is over 1600 bytes, as this is the limit of the protocol\&.
.sp
One useful trick is to pipe the message through
-\FCsmbclient\F[]\&. For example: smbclient \-M FRED < mymessage\&.txt will send the message in the file
-\FCmymessage\&.txt\F[]
+smbclient\&. For example: smbclient \-M FRED < mymessage\&.txt will send the message in the file
+mymessage\&.txt
to the machine FRED\&.
.sp
You may also find the
@@ -374,7 +222,7 @@ By default, the client writes messages to standard output \- typically the user\
\-L|\-\-list
.RS 4
This option allows you to look at what services are available on a server\&. You use it as
-\FCsmbclient \-L host\F[]
+smbclient \-L host
and a list should appear\&. The
\fI\-I \fR
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\&.
@@ -402,7 +250,7 @@ Levels above 1 will generate considerable amounts of log data, and should only b
Note that specifying this parameter here will override the
\m[blue]\fB\%smb.conf.5.html#\fR\m[]
parameter in the
-\FCsmb\&.conf\F[]
+smb\&.conf
file\&.
.RE
.PP
@@ -414,7 +262,7 @@ Prints the program version number\&.
\-s|\-\-configfile <configuration file>
.RS 4
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
-\FCsmb\&.conf\F[]
+smb\&.conf
for more information\&. The default configuration file name is determined at compile time\&.
.RE
.PP
@@ -451,25 +299,11 @@ This option allows you to specify a file from which to read the username and pas
.if n \{\
.RS 4
.\}
-.fam C
-.ps -1
.nf
-.if t \{\
-.sp -1
-.\}
-.BB lightgray adjust-for-leading-newline
-.sp -1
-
username = <value>
password = <value>
domain = <value>
-.EB lightgray adjust-for-leading-newline
-.if t \{\
-.sp 1
-.\}
.fi
-.fam
-.ps +1
.if n \{\
.RE
.\}
@@ -494,9 +328,9 @@ A third option is to use a credentials file which contains the plaintext of the
for more details\&.
.sp
Be cautious about including passwords in scripts\&. Also, on many systems the command line of a running process may be seen via the
-\FCps\F[]
+ps
command\&. To be safe always allow
-\FCrpcclient\F[]
+rpcclient
to prompt for a password and type it in directly\&.
.RE
.PP
@@ -505,15 +339,15 @@ to prompt for a password and type it in directly\&.
This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the
\m[blue]\fB\%smb.conf.5.html#\fR\m[]
parameter in the
-\FCsmb\&.conf\F[]
+smb\&.conf
file\&. However, a command line setting will take precedence over settings in
-\FCsmb\&.conf\F[]\&.
+smb\&.conf\&.
.RE
.PP
\-i|\-\-scope <scope>
.RS 4
This specifies a NetBIOS scope that
-\FCnmblookup\F[]
+nmblookup
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
\fIvery\fR
rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with\&.
@@ -527,14 +361,14 @@ Set the SMB domain of the username\&. This overrides the default domain which is
\-O|\-\-socket\-options socket options
.RS 4
TCP socket options to set on the client socket\&. See the socket options parameter in the
-\FCsmb\&.conf\F[]
+smb\&.conf
manual page for the list of valid options\&.
.RE
.PP
\-T|\-\-tar tar options
.RS 4
smbclient may be used to create
-\FCtar(1) \F[]
+tar(1)
compatible backups of all the files on an SMB/CIFS share\&. The secondary tar flags that can be given to this option are :
.sp
.RS 4
@@ -691,8 +525,8 @@ flags\&.
.RE
\fITar Long File Names\fR
.sp
-\FCsmbclient\F[]\'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,
-\FCsmbclient\F[]\'s tar option places all files in the archive with relative names, not absolute names\&.
+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\&.
.sp
\fITar Filenames\fR
.sp
@@ -701,33 +535,33 @@ All file names can be given as DOS path names (with \'\e\e\' as the component se
\fIExamples\fR
.sp
Restore from tar file
-\FCbackup\&.tar\F[]
+backup\&.tar
into myshare on mypc (no password on share)\&.
.sp
-\FCsmbclient //mypc/yshare "" \-N \-Tx backup\&.tar \F[]
+smbclient //mypc/yshare "" \-N \-Tx backup\&.tar
.sp
Restore everything except
-\FCusers/docs\F[]
+users/docs
.sp
-\FCsmbclient //mypc/myshare "" \-N \-TXx backup\&.tar users/docs\F[]
+smbclient //mypc/myshare "" \-N \-TXx backup\&.tar users/docs
.sp
Create a tar file of the files beneath
-\FC users/docs\F[]\&.
+users/docs\&.
.sp
-\FCsmbclient //mypc/myshare "" \-N \-Tc backup\&.tar users/docs \F[]
+smbclient //mypc/myshare "" \-N \-Tc backup\&.tar users/docs
.sp
Create the same tar file as above, but now use a DOS path name\&.
.sp
-\FCsmbclient //mypc/myshare "" \-N \-tc backup\&.tar users\eedocs \F[]
+smbclient //mypc/myshare "" \-N \-tc backup\&.tar users\eedocs
.sp
Create a tar file of the files listed in the file
-\FCtarlist\F[]\&.
+tarlist\&.
.sp
-\FCsmbclient //mypc/myshare "" \-N \-TcF backup\&.tar tarlist\F[]
+smbclient //mypc/myshare "" \-N \-TcF backup\&.tar tarlist
.sp
Create a tar file of all the files and directories in the share\&.
.sp
-\FCsmbclient //mypc/myshare "" \-N \-Tc backup\&.tar * \F[]
+smbclient //mypc/myshare "" \-N \-Tc backup\&.tar *
.RE
.PP
\-D|\-\-directory initial directory
@@ -743,13 +577,13 @@ is implied by
\fI\-c\fR\&.
.sp
This is particularly useful in scripts and for printing stdin to the server, e\&.g\&.
-\FC\-c \'print \-\'\F[]\&.
+\-c \'print \-\'\&.
.RE
.SH "OPERATIONS"
.PP
Once the client is running, the user is presented with a prompt :
.PP
-\FCsmb:\e> \F[]
+smb:\e>
.PP
The backslash ("\e\e") indicates the current working directory on the server, and will change if the current working directory is changed\&.
.PP
@@ -861,10 +695,10 @@ Terminate the connection with the server and exit from the program\&.
get <remote file name> [local file name]
.RS 4
Copy the file called
-\FCremote file name\F[]
+remote file name
from the server to the machine running the client\&. If specified, name the local copy
-\FClocal file name\F[]\&. Note that all transfers in
-\FCsmbclient\F[]
+local file name\&. Note that all transfers in
+smbclient
are binary\&. See also the lowercase command\&.
.RE
.PP
@@ -959,7 +793,7 @@ from the server to the machine running the client\&.
Note that
\fImask\fR
is interpreted differently during recursive operation and non\-recursive operation \- refer to the recurse and mask commands for more information\&. Note that all transfers in
-\FCsmbclient\F[]
+smbclient
are binary\&. See also the lowercase command\&.
.RE
.PP
@@ -982,7 +816,7 @@ in the current working directory on the local machine to the current working dir
Note that
\fImask\fR
is interpreted differently during recursive operation and non\-recursive operation \- refer to the recurse and mask commands for more information\&. Note that all transfers in
-\FCsmbclient\F[]
+smbclient
are binary\&.
.RE
.PP
@@ -1031,10 +865,10 @@ When toggled ON, the user will be prompted to confirm the transfer of each file
put <local file name> [remote file name]
.RS 4
Copy the file called
-\FClocal file name\F[]
+local file name
from the machine running the client to the server\&. If specified, name the remote copy
-\FCremote file name\F[]\&. Note that all transfers in
-\FCsmbclient\F[]
+remote file name\&. Note that all transfers in
+smbclient
are binary\&. See also the lowercase command\&.
.RE
.PP
@@ -1091,7 +925,7 @@ setmode <filename> <perm=[+|\e\-]rsha>
.RS 4
A version of the DOS attrib command to set file permissions\&. For example:
.sp
-\FCsetmode myfile +r \F[]
+setmode myfile +r
.sp
would make myfile read only\&.
.RE
@@ -1168,9 +1002,9 @@ may contain the path, executed with system(), which the client should connect to
The location of the client program is a matter for individual system administrators\&. The following are thus suggestions only\&.
.PP
It is recommended that the smbclient software be installed in the
-\FC/usr/local/samba/bin/\F[]
+/usr/local/samba/bin/
or
-\FC /usr/samba/bin/\F[]
+/usr/samba/bin/
directory, this directory readable by all, writeable only by root\&. The client program itself should be executable by all\&. The client should
\fINOT\fR
be setuid or setgid!