Ignore:
Timestamp:
Jul 2, 2011, 3:35:33 PM (14 years ago)
Author:
Herwig Bauernfeind
Message:

Samba 3.5: Update trunk to 3.5.8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/docs/manpages/smbclient.1

    r480 r596  
     1'\" t
    12.\"     Title: smbclient
    23.\"    Author: [see the "AUTHOR" section]
    3 .\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
    4 .\"      Date: 06/18/2010
     4.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
     5.\"      Date: 03/06/2011
    56.\"    Manual: User Commands
    67.\"    Source: Samba 3.5
    78.\"  Language: English
    89.\"
    9 .TH "SMBCLIENT" "1" "06/18/2010" "Samba 3\&.5" "User Commands"
    10 .\" -----------------------------------------------------------------
    11 .\" * (re)Define some macros
    12 .\" -----------------------------------------------------------------
    13 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    14 .\" toupper - uppercase a string (locale-aware)
    15 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    16 .de toupper
    17 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
    18 \\$*
    19 .tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
    20 ..
    21 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    22 .\" SH-xref - format a cross-reference to an SH section
    23 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    24 .de SH-xref
    25 .ie n \{\
    26 .\}
    27 .toupper \\$*
    28 .el \{\
    29 \\$*
    30 .\}
    31 ..
    32 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    33 .\" SH - level-one heading that works better for non-TTY output
    34 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    35 .de1 SH
    36 .\" put an extra blank line of space above the head in non-TTY output
    37 .if t \{\
    38 .sp 1
    39 .\}
    40 .sp \\n[PD]u
    41 .nr an-level 1
    42 .set-an-margin
    43 .nr an-prevailing-indent \\n[IN]
    44 .fi
    45 .in \\n[an-margin]u
    46 .ti 0
    47 .HTML-TAG ".NH \\n[an-level]"
    48 .it 1 an-trap
    49 .nr an-no-space-flag 1
    50 .nr an-break-flag 1
    51 \." make the size of the head bigger
    52 .ps +3
    53 .ft B
    54 .ne (2v + 1u)
    55 .ie n \{\
    56 .\" if n (TTY output), use uppercase
    57 .toupper \\$*
    58 .\}
    59 .el \{\
    60 .nr an-break-flag 0
    61 .\" if not n (not TTY), use normal case (not uppercase)
    62 \\$1
    63 .in \\n[an-margin]u
    64 .ti 0
    65 .\" if not n (not TTY), put a border/line under subheading
    66 .sp -.6
    67 \l'\n(.lu'
    68 .\}
    69 ..
    70 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    71 .\" SS - level-two heading that works better for non-TTY output
    72 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    73 .de1 SS
    74 .sp \\n[PD]u
    75 .nr an-level 1
    76 .set-an-margin
    77 .nr an-prevailing-indent \\n[IN]
    78 .fi
    79 .in \\n[IN]u
    80 .ti \\n[SN]u
    81 .it 1 an-trap
    82 .nr an-no-space-flag 1
    83 .nr an-break-flag 1
    84 .ps \\n[PS-SS]u
    85 \." make the size of the head bigger
    86 .ps +2
    87 .ft B
    88 .ne (2v + 1u)
    89 .if \\n[.$] \&\\$*
    90 ..
    91 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    92 .\" BB/BE - put background/screen (filled box) around block of text
    93 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    94 .de BB
    95 .if t \{\
    96 .sp -.5
    97 .br
    98 .in +2n
    99 .ll -2n
    100 .gcolor red
    101 .di BX
    102 .\}
    103 ..
    104 .de EB
    105 .if t \{\
    106 .if "\\$2"adjust-for-leading-newline" \{\
    107 .sp -1
    108 .\}
    109 .br
    110 .di
    111 .in
    112 .ll
    113 .gcolor
    114 .nr BW \\n(.lu-\\n(.i
    115 .nr BH \\n(dn+.5v
    116 .ne \\n(BHu+.5v
    117 .ie "\\$2"adjust-for-leading-newline" \{\
    118 \M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
    119 .\}
    120 .el \{\
    121 \M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
    122 .\}
    123 .in 0
    124 .sp -.5v
    125 .nf
    126 .BX
    127 .in
    128 .sp .5v
    129 .fi
    130 .\}
    131 ..
    132 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    133 .\" BM/EM - put colored marker in margin next to block of text
    134 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    135 .de BM
    136 .if t \{\
    137 .br
    138 .ll -2n
    139 .gcolor red
    140 .di BX
    141 .\}
    142 ..
    143 .de EM
    144 .if t \{\
    145 .br
    146 .di
    147 .ll
    148 .gcolor
    149 .nr BH \\n(dn
    150 .ne \\n(BHu
    151 \M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
    152 .in 0
    153 .nf
    154 .BX
    155 .in
    156 .fi
    157 .\}
    158 ..
     10.TH "SMBCLIENT" "1" "03/06/2011" "Samba 3\&.5" "User Commands"
    15911.\" -----------------------------------------------------------------
    16012.\" * set default formatting
     
    16719.\" * MAIN CONTENT STARTS HERE *
    16820.\" -----------------------------------------------------------------
    169 .SH "Name"
     21.SH "NAME"
    17022smbclient \- ftp\-like client to access SMB/CIFS resources on servers
    171 .SH "Synopsis"
    172 .fam C
     23.SH "SYNOPSIS"
    17324.HP \w'\ 'u
    174 \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>]
    175 .fam
    176 .fam C
     25smbclient [\-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>]
    17726.HP \w'\ 'u
    178 \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]
    179 .fam
     27smbclient {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]
    18028.SH "DESCRIPTION"
    18129.PP
     
    18432suite\&.
    18533.PP
    186 \FCsmbclient\F[]
     34smbclient
    18735is a client that can \'talk\' to an SMB/CIFS server\&. It offers an interface similar to that of the ftp program (see
    18836\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\&.
     
    19240.RS 4
    19341servicename is the name of the service you want to use on the server\&. A service name takes the form
    194 \FC//server/service\F[]
     42//server/service
    19543where
    19644\fIserver \fR
     
    19846\fIservice\fR
    19947is the name of the service offered\&. Thus to connect to the service "printer" on the SMB/CIFS server "smbserver", you would use the servicename
    200 \FC//smbserver/printer \F[]
     48//smbserver/printer
    20149.sp
    20250Note 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\&.
     
    20553\fI\-R\fR
    20654parameter to
    207 \FCsmbclient\F[]
     55smbclient
    20856or using the name resolve order parameter in the
    20957\fBsmb.conf\fR(5)
     
    256104.\}
    257105\fBhost\fR: Do a standard host name to IP address resolution, using the system
    258 \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
    259 \FC/etc/nsswitch\&.conf\F[]
     106/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
     107/etc/nsswitch\&.conf
    260108file)\&. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\&.
    261109.RE
     
    307155.sp
    308156One useful trick is to pipe the message through
    309 \FCsmbclient\F[]\&. For example: smbclient \-M FRED < mymessage\&.txt will send the message in the file
    310 \FCmymessage\&.txt\F[]
     157smbclient\&. For example: smbclient \-M FRED < mymessage\&.txt will send the message in the file
     158mymessage\&.txt
    311159to the machine FRED\&.
    312160.sp
     
    375223.RS 4
    376224This option allows you to look at what services are available on a server\&. You use it as
    377 \FCsmbclient \-L host\F[]
     225smbclient \-L host
    378226and a list should appear\&. The
    379227\fI\-I \fR
     
    403251\m[blue]\fB\%smb.conf.5.html#\fR\m[]
    404252parameter in the
    405 \FCsmb\&.conf\F[]
     253smb\&.conf
    406254file\&.
    407255.RE
     
    415263.RS 4
    416264The 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
    417 \FCsmb\&.conf\F[]
     265smb\&.conf
    418266for more information\&. The default configuration file name is determined at compile time\&.
    419267.RE
     
    452300.RS 4
    453301.\}
    454 .fam C
    455 .ps -1
    456302.nf
    457 .if t \{\
    458 .sp -1
    459 .\}
    460 .BB lightgray adjust-for-leading-newline
    461 .sp -1
    462 
    463303username = <value>
    464304password = <value>
    465305domain   = <value>
    466 .EB lightgray adjust-for-leading-newline
    467 .if t \{\
    468 .sp 1
    469 .\}
    470306.fi
    471 .fam
    472 .ps +1
    473307.if n \{\
    474308.RE
     
    495329.sp
    496330Be cautious about including passwords in scripts\&. Also, on many systems the command line of a running process may be seen via the
    497 \FCps\F[]
     331ps
    498332command\&. To be safe always allow
    499 \FCrpcclient\F[]
     333rpcclient
    500334to prompt for a password and type it in directly\&.
    501335.RE
     
    506340\m[blue]\fB\%smb.conf.5.html#\fR\m[]
    507341parameter in the
    508 \FCsmb\&.conf\F[]
     342smb\&.conf
    509343file\&. However, a command line setting will take precedence over settings in
    510 \FCsmb\&.conf\F[]\&.
     344smb\&.conf\&.
    511345.RE
    512346.PP
     
    514348.RS 4
    515349This specifies a NetBIOS scope that
    516 \FCnmblookup\F[]
     350nmblookup
    517351will 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
    518352\fIvery\fR
     
    528362.RS 4
    529363TCP socket options to set on the client socket\&. See the socket options parameter in the
    530 \FCsmb\&.conf\F[]
     364smb\&.conf
    531365manual page for the list of valid options\&.
    532366.RE
     
    535369.RS 4
    536370smbclient may be used to create
    537 \FCtar(1) \F[]
     371tar(1)
    538372compatible backups of all the files on an SMB/CIFS share\&. The secondary tar flags that can be given to this option are :
    539373.sp
     
    692526\fITar Long File Names\fR
    693527.sp
    694 \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,
    695 \FCsmbclient\F[]\'s tar option places all files in the archive with relative names, not absolute names\&.
     528smbclient\'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,
     529smbclient\'s tar option places all files in the archive with relative names, not absolute names\&.
    696530.sp
    697531\fITar Filenames\fR
     
    702536.sp
    703537Restore from tar file
    704 \FCbackup\&.tar\F[]
     538backup\&.tar
    705539into myshare on mypc (no password on share)\&.
    706540.sp
    707 \FCsmbclient //mypc/yshare "" \-N \-Tx backup\&.tar \F[]
     541smbclient //mypc/yshare "" \-N \-Tx backup\&.tar
    708542.sp
    709543Restore everything except
    710 \FCusers/docs\F[]
    711 .sp
    712 \FCsmbclient //mypc/myshare "" \-N \-TXx backup\&.tar users/docs\F[]
     544users/docs
     545.sp
     546smbclient //mypc/myshare "" \-N \-TXx backup\&.tar users/docs
    713547.sp
    714548Create a tar file of the files beneath
    715 \FC users/docs\F[]\&.
    716 .sp
    717 \FCsmbclient //mypc/myshare "" \-N \-Tc backup\&.tar users/docs \F[]
     549users/docs\&.
     550.sp
     551smbclient //mypc/myshare "" \-N \-Tc backup\&.tar users/docs
    718552.sp
    719553Create the same tar file as above, but now use a DOS path name\&.
    720554.sp
    721 \FCsmbclient //mypc/myshare "" \-N \-tc backup\&.tar users\eedocs \F[]
     555smbclient //mypc/myshare "" \-N \-tc backup\&.tar users\eedocs
    722556.sp
    723557Create a tar file of the files listed in the file
    724 \FCtarlist\F[]\&.
    725 .sp
    726 \FCsmbclient //mypc/myshare "" \-N \-TcF backup\&.tar tarlist\F[]
     558tarlist\&.
     559.sp
     560smbclient //mypc/myshare "" \-N \-TcF backup\&.tar tarlist
    727561.sp
    728562Create a tar file of all the files and directories in the share\&.
    729563.sp
    730 \FCsmbclient //mypc/myshare "" \-N \-Tc backup\&.tar * \F[]
     564smbclient //mypc/myshare "" \-N \-Tc backup\&.tar *
    731565.RE
    732566.PP
     
    744578.sp
    745579This is particularly useful in scripts and for printing stdin to the server, e\&.g\&.
    746 \FC\-c \'print \-\'\F[]\&.
     580\-c \'print \-\'\&.
    747581.RE
    748582.SH "OPERATIONS"
     
    750584Once the client is running, the user is presented with a prompt :
    751585.PP
    752 \FCsmb:\e> \F[]
     586smb:\e>
    753587.PP
    754588The backslash ("\e\e") indicates the current working directory on the server, and will change if the current working directory is changed\&.
     
    862696.RS 4
    863697Copy the file called
    864 \FCremote file name\F[]
     698remote file name
    865699from the server to the machine running the client\&. If specified, name the local copy
    866 \FClocal file name\F[]\&. Note that all transfers in
    867 \FCsmbclient\F[]
     700local file name\&. Note that all transfers in
     701smbclient
    868702are binary\&. See also the lowercase command\&.
    869703.RE
     
    960794\fImask\fR
    961795is interpreted differently during recursive operation and non\-recursive operation \- refer to the recurse and mask commands for more information\&. Note that all transfers in
    962 \FCsmbclient\F[]
     796smbclient
    963797are binary\&. See also the lowercase command\&.
    964798.RE
     
    983817\fImask\fR
    984818is interpreted differently during recursive operation and non\-recursive operation \- refer to the recurse and mask commands for more information\&. Note that all transfers in
    985 \FCsmbclient\F[]
     819smbclient
    986820are binary\&.
    987821.RE
     
    1032866.RS 4
    1033867Copy the file called
    1034 \FClocal file name\F[]
     868local file name
    1035869from the machine running the client to the server\&. If specified, name the remote copy
    1036 \FCremote file name\F[]\&. Note that all transfers in
    1037 \FCsmbclient\F[]
     870remote file name\&. Note that all transfers in
     871smbclient
    1038872are binary\&. See also the lowercase command\&.
    1039873.RE
     
    1092926A version of the DOS attrib command to set file permissions\&. For example:
    1093927.sp
    1094 \FCsetmode myfile +r \F[]
     928setmode myfile +r
    1095929.sp
    1096930would make myfile read only\&.
     
    11691003.PP
    11701004It is recommended that the smbclient software be installed in the
    1171 \FC/usr/local/samba/bin/\F[]
     1005/usr/local/samba/bin/
    11721006or
    1173 \FC /usr/samba/bin/\F[]
     1007/usr/samba/bin/
    11741008directory, this directory readable by all, writeable only by root\&. The client program itself should be executable by all\&. The client should
    11751009\fINOT\fR
Note: See TracChangeset for help on using the changeset viewer.