Changeset 411 for branches/samba-3.3.x/docs/manpages/smbclient.1
- Timestamp:
- Mar 1, 2010, 3:05:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/docs/manpages/smbclient.1
r368 r411 1 '\" t2 1 .\" Title: smbclient 3 2 .\" Author: [see the "AUTHOR" section] 4 .\" Generator: DocBook XSL Stylesheets v1.7 5.2<http://docbook.sf.net/>5 .\" Date: 0 1/14/20103 .\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/> 4 .\" Date: 02/22/2010 6 5 .\" Manual: User Commands 7 6 .\" Source: Samba 3.3 8 7 .\" Language: English 9 8 .\" 10 .TH "SMBCLIENT" "1" "01/14/2010" "Samba 3\&.3" "User Commands" 9 .TH "SMBCLIENT" "1" "02/22/2010" "Samba 3\&.3" "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 .. 11 159 .\" ----------------------------------------------------------------- 12 160 .\" * set default formatting … … 19 167 .\" * MAIN CONTENT STARTS HERE * 20 168 .\" ----------------------------------------------------------------- 21 .SH "N AME"169 .SH "Name" 22 170 smbclient \- ftp\-like client to access SMB/CIFS resources on servers 23 .SH "SYNOPSIS" 171 .SH "Synopsis" 172 .fam C 24 173 .HP \w'\ 'u 25 smbclient [\-b\ <buffer\ size>] [\-d\ debuglevel] [\-e] [\-L\ <netbios\ name>] [\-U\ username] [\-I\ destinationIP] [\-M\ <netbios\ name>] [\-m\ maxprotocol] [\-A\ authfile] [\-N] [\-g] [\-i\ scope] [\-O\ <socket\ options>] [\-p\ port] [\-R\ <name\ resolve\ order>] [\-s\ <smb\ config\ file>] [\-k] [\-P] [\-c\ <command>] 174 \FCsmbclient\F[] [\-b\ <buffer\ size>] [\-d\ debuglevel] [\-e] [\-L\ <netbios\ name>] [\-U\ username] [\-I\ destinationIP] [\-M\ <netbios\ name>] [\-m\ maxprotocol] [\-A\ authfile] [\-N] [\-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 26 177 .HP \w'\ 'u 27 smbclient {servicename} [password] [\-b\ <buffer\ size>] [\-d\ debuglevel] [\-e] [\-D\ Directory] [\-U\ username] [\-W\ workgroup] [\-M\ <netbios\ name>] [\-m\ maxprotocol] [\-A\ authfile] [\-N] [\-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] 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] [\-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 28 180 .SH "DESCRIPTION" 29 181 .PP … … 32 184 suite\&. 33 185 .PP 34 smbclient 186 \FCsmbclient\F[] 35 187 is a client that can \'talk\' to an SMB/CIFS server\&. It offers an interface similar to that of the ftp program (see 36 188 \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\&. … … 40 192 .RS 4 41 193 servicename is the name of the service you want to use on the server\&. A service name takes the form 42 //server/service 194 \FC//server/service\F[] 43 195 where 44 196 \fIserver \fR … … 46 198 \fIservice\fR 47 199 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 48 //smbserver/printer 200 \FC//smbserver/printer \F[] 49 201 .sp 50 202 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\&. … … 53 205 \fI\-R\fR 54 206 parameter to 55 smbclient 207 \FCsmbclient\F[] 56 208 or using the name resolve order parameter in the 57 209 \fBsmb.conf\fR(5) … … 104 256 .\} 105 257 \fBhost\fR: Do a standard host name to IP address resolution, using the system 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 the107 /etc/nsswitch\&.conf 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[] 108 260 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\&. 109 261 .RE … … 155 307 .sp 156 308 One useful trick is to pipe the message through 157 smbclient\&. For example: smbclient \-M FRED < mymessage\&.txt will send the message in the file158 mymessage\&.txt 309 \FCsmbclient\F[]\&. For example: smbclient \-M FRED < mymessage\&.txt will send the message in the file 310 \FCmymessage\&.txt\F[] 159 311 to the machine FRED\&. 160 312 .sp … … 218 370 .RS 4 219 371 This option allows you to look at what services are available on a server\&. You use it as 220 smbclient \-L host 372 \FCsmbclient \-L host\F[] 221 373 and a list should appear\&. The 222 374 \fI\-I \fR … … 227 379 .RS 4 228 380 This option tells 229 smbclient 381 \FCsmbclient\F[] 230 382 how to interpret filenames coming from the remote server\&. Usually Asian language multibyte UNIX implementations use different character sets than SMB/CIFS servers (\fIEUC\fR 231 383 instead of 232 384 \fI SJIS\fR 233 385 for example)\&. Setting this parameter will let 234 smbclient 386 \FCsmbclient\F[] 235 387 convert between the UNIX filenames and the SMB filenames correctly\&. This option has not been seriously tested and may have some problems\&. 236 388 .sp … … 260 412 \m[blue]\fB\%smb.conf.5.html#\fR\m[] 261 413 parameter in the 262 smb\&.conf 414 \FCsmb\&.conf\F[] 263 415 file\&. 264 416 .RE … … 272 424 .RS 4 273 425 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 274 smb\&.conf 426 \FCsmb\&.conf\F[] 275 427 for more information\&. The default configuration file name is determined at compile time\&. 276 428 .RE … … 297 449 .RE 298 450 .PP 451 \-C|\-\-use\-ccache 452 .RS 4 453 Try to use the credentials cached by winbind\&. 454 .RE 455 .PP 299 456 \-A|\-\-authentication\-file=filename 300 457 .RS 4 … … 304 461 .RS 4 305 462 .\} 463 .fam C 464 .ps -1 306 465 .nf 466 .if t \{\ 467 .sp -1 468 .\} 469 .BB lightgray adjust-for-leading-newline 470 .sp -1 471 307 472 username = <value> 308 473 password = <value> 309 474 domain = <value> 475 .EB lightgray adjust-for-leading-newline 476 .if t \{\ 477 .sp 1 478 .\} 310 479 .fi 480 .fam 481 .ps +1 311 482 .if n \{\ 312 483 .RE … … 333 504 .sp 334 505 Be cautious about including passwords in scripts\&. Also, on many systems the command line of a running process may be seen via the 335 ps 506 \FCps\F[] 336 507 command\&. To be safe always allow 337 rpcclient 508 \FCrpcclient\F[] 338 509 to prompt for a password and type it in directly\&. 339 510 .RE … … 344 515 \m[blue]\fB\%smb.conf.5.html#\fR\m[] 345 516 parameter in the 346 smb\&.conf 517 \FCsmb\&.conf\F[] 347 518 file\&. However, a command line setting will take precedence over settings in 348 smb\&.conf\&.519 \FCsmb\&.conf\F[]\&. 349 520 .RE 350 521 .PP … … 352 523 .RS 4 353 524 This specifies a NetBIOS scope that 354 nmblookup 525 \FCnmblookup\F[] 355 526 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 356 527 \fIvery\fR … … 366 537 .RS 4 367 538 TCP socket options to set on the client socket\&. See the socket options parameter in the 368 smb\&.conf 539 \FCsmb\&.conf\F[] 369 540 manual page for the list of valid options\&. 370 541 .RE … … 373 544 .RS 4 374 545 smbclient may be used to create 375 tar(1) 546 \FCtar(1) \F[] 376 547 compatible backups of all the files on an SMB/CIFS share\&. The secondary tar flags that can be given to this option are : 377 548 .sp … … 530 701 \fITar Long File Names\fR 531 702 .sp 532 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,533 smbclient\'s tar option places all files in the archive with relative names, not absolute names\&.703 \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, 704 \FCsmbclient\F[]\'s tar option places all files in the archive with relative names, not absolute names\&. 534 705 .sp 535 706 \fITar Filenames\fR … … 540 711 .sp 541 712 Restore from tar file 542 backup\&.tar 713 \FCbackup\&.tar\F[] 543 714 into myshare on mypc (no password on share)\&. 544 715 .sp 545 smbclient //mypc/yshare "" \-N \-Tx backup\&.tar 716 \FCsmbclient //mypc/yshare "" \-N \-Tx backup\&.tar \F[] 546 717 .sp 547 718 Restore everything except 548 users/docs 549 .sp 550 smbclient //mypc/myshare "" \-N \-TXx backup\&.tar users/docs 719 \FCusers/docs\F[] 720 .sp 721 \FCsmbclient //mypc/myshare "" \-N \-TXx backup\&.tar users/docs\F[] 551 722 .sp 552 723 Create a tar file of the files beneath 553 users/docs\&.554 .sp 555 smbclient //mypc/myshare "" \-N \-Tc backup\&.tar users/docs 724 \FC users/docs\F[]\&. 725 .sp 726 \FCsmbclient //mypc/myshare "" \-N \-Tc backup\&.tar users/docs \F[] 556 727 .sp 557 728 Create the same tar file as above, but now use a DOS path name\&. 558 729 .sp 559 smbclient //mypc/myshare "" \-N \-tc backup\&.tar users\eedocs 730 \FCsmbclient //mypc/myshare "" \-N \-tc backup\&.tar users\eedocs \F[] 560 731 .sp 561 732 Create a tar file of the files listed in the file 562 tarlist\&.563 .sp 564 smbclient //mypc/myshare "" \-N \-TcF backup\&.tar tarlist 733 \FCtarlist\F[]\&. 734 .sp 735 \FCsmbclient //mypc/myshare "" \-N \-TcF backup\&.tar tarlist\F[] 565 736 .sp 566 737 Create a tar file of all the files and directories in the share\&. 567 738 .sp 568 smbclient //mypc/myshare "" \-N \-Tc backup\&.tar * 739 \FCsmbclient //mypc/myshare "" \-N \-Tc backup\&.tar * \F[] 569 740 .RE 570 741 .PP … … 582 753 .sp 583 754 This is particularly useful in scripts and for printing stdin to the server, e\&.g\&. 584 \ -c \'print \-\'\&.755 \FC\-c \'print \-\'\F[]\&. 585 756 .RE 586 757 .SH "OPERATIONS" … … 588 759 Once the client is running, the user is presented with a prompt : 589 760 .PP 590 smb:\e> 761 \FCsmb:\e> \F[] 591 762 .PP 592 763 The backslash ("\e\e") indicates the current working directory on the server, and will change if the current working directory is changed\&. … … 700 871 .RS 4 701 872 Copy the file called 702 remote file name 873 \FCremote file name\F[] 703 874 from the server to the machine running the client\&. If specified, name the local copy 704 local file name\&. Note that all transfers in705 smbclient 875 \FClocal file name\F[]\&. Note that all transfers in 876 \FCsmbclient\F[] 706 877 are binary\&. See also the lowercase command\&. 707 878 .RE … … 798 969 \fImask\fR 799 970 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 800 smbclient 971 \FCsmbclient\F[] 801 972 are binary\&. See also the lowercase command\&. 802 973 .RE … … 821 992 \fImask\fR 822 993 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 823 smbclient 994 \FCsmbclient\F[] 824 995 are binary\&. 825 996 .RE … … 870 1041 .RS 4 871 1042 Copy the file called 872 local file name 1043 \FClocal file name\F[] 873 1044 from the machine running the client to the server\&. If specified, name the remote copy 874 remote file name\&. Note that all transfers in875 smbclient 1045 \FCremote file name\F[]\&. Note that all transfers in 1046 \FCsmbclient\F[] 876 1047 are binary\&. See also the lowercase command\&. 877 1048 .RE … … 925 1096 A version of the DOS attrib command to set file permissions\&. For example: 926 1097 .sp 927 setmode myfile +r 1098 \FCsetmode myfile +r \F[] 928 1099 .sp 929 1100 would make myfile read only\&. … … 1002 1173 .PP 1003 1174 It is recommended that the smbclient software be installed in the 1004 /usr/local/samba/bin/ 1175 \FC/usr/local/samba/bin/\F[] 1005 1176 or 1006 /usr/samba/bin/ 1177 \FC /usr/samba/bin/\F[] 1007 1178 directory, this directory readable by all, writeable only by root\&. The client program itself should be executable by all\&. The client should 1008 1179 \fINOT\fR
Note:
See TracChangeset
for help on using the changeset viewer.