Changeset 988 for vendor/current/docs/manpages/smbclient.1
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/docs/manpages/smbclient.1
r860 r988 2 2 .\" Title: smbclient 3 3 .\" Author: [see the "AUTHOR" section] 4 .\" Generator: DocBook XSL Stylesheets v1.7 6.1 <http://docbook.sf.net/>5 .\" Date: 0 9/18/20134 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> 5 .\" Date: 05/02/2016 6 6 .\" Manual: User Commands 7 .\" Source: Samba 3.67 .\" Source: Samba 4.4 8 8 .\" Language: English 9 9 .\" 10 .TH "SMBCLIENT" "1" "0 9/18/2013" "Samba 3\&.6" "User Commands"10 .TH "SMBCLIENT" "1" "05/02/2016" "Samba 4\&.4" "User Commands" 11 11 .\" ----------------------------------------------------------------- 12 12 .\" * Define some portability stuff … … 32 32 .SH "SYNOPSIS" 33 33 .HP \w'\ 'u 34 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>]34 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>] [\-t\ <per\-operation\ timeout\ in\ seconds>] [\-k] [\-P] [\-c\ <command>] 35 35 .HP \w'\ 'u 36 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]36 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\ <per\-operation\ timeout\ in\ seconds>] [\-T<c|x>IXFqgbNan] [\-k] 37 37 .SH "DESCRIPTION" 38 38 .PP … … 198 198 \-m|\-\-max\-protocol protocol 199 199 .RS 4 200 This parameter sets the maximum protocol version announced by the client\&.200 This allows the user to select the highest SMB protocol level that smbclient will use to connect to the server\&. By default this is set to NT1, which is the highest available SMB1 protocol\&. To connect using SMB2 or SMB3 protocol, use the strings SMB2 or SMB3 respectively\&. Note that to connect to a Windows 2012 server with encrypted transport selecting a max\-protocol of SMB3 is required\&. 201 201 .RE 202 202 .PP … … 204 204 .RS 4 205 205 Make queries to the external server using the machine account of the local server\&. 206 .RE207 .PP208 \-h|\-\-help209 .RS 4210 Print a summary of command line options\&.211 206 .RE 212 207 .PP … … 241 236 \-b|\-\-send\-buffer buffersize 242 237 .RS 4 243 This option changes the transmit/send buffer 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\&. 244 .RE 245 .PP 246 \-e|\-\-encrypt 247 .RS 4 248 This command line parameter requires the remote server support the UNIX extensions\&. Request that the connection be encrypted\&. This is new for Samba 3\&.2 and will only work with Samba 3\&.2 or above servers\&. Negotiates SMB encryption using GSSAPI\&. Uses the given credentials for the encryption negotiation (either kerberos or NTLMv1/v2 if given domain/username/password triple\&. Fails the connection if encryption cannot be negotiated\&. 249 .RE 250 .PP 251 \-d|\-\-debuglevel=level 252 .RS 4 253 \fIlevel\fR 254 is an integer from 0 to 10\&. The default value if this parameter is not specified is 1\&. 255 .sp 256 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\&. 257 .sp 258 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\&. 259 .sp 260 Note that specifying this parameter here will override the 261 \m[blue]\fBlog level\fR\m[] 262 parameter in the 263 smb\&.conf 264 file\&. 265 .RE 266 .PP 267 \-V|\-\-version 268 .RS 4 269 Prints the program version number\&. 270 .RE 271 .PP 272 \-s|\-\-configfile <configuration file> 273 .RS 4 274 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 275 smb\&.conf 276 for more information\&. The default configuration file name is determined at compile time\&. 277 .RE 278 .PP 279 \-l|\-\-log\-basename=logdirectory 280 .RS 4 281 Base directory name for log/debug files\&. The extension 282 \fB"\&.progname"\fR 283 will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&. 284 .RE 285 .PP 286 \-N|\-\-no\-pass 287 .RS 4 288 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\&. 289 .sp 290 Unless a password is specified on the command line or this parameter is specified, the client will request a password\&. 291 .sp 292 If a password is specified on the command line and this option is also defined the password on the command line will be silently ingnored and no password will be used\&. 293 .RE 294 .PP 295 \-k|\-\-kerberos 296 .RS 4 297 Try to authenticate with kerberos\&. Only useful in an Active Directory environment\&. 298 .RE 299 .PP 300 \-C|\-\-use\-ccache 301 .RS 4 302 Try to use the credentials cached by winbind\&. 303 .RE 304 .PP 305 \-A|\-\-authentication\-file=filename 306 .RS 4 307 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 308 .sp 309 .if n \{\ 310 .RS 4 311 .\} 312 .nf 313 username = <value> 314 password = <value> 315 domain = <value> 316 .fi 317 .if n \{\ 318 .RE 319 .\} 320 .sp 321 Make certain that the permissions on the file restrict access from unwanted users\&. 322 .RE 323 .PP 324 \-U|\-\-user=username[%password] 325 .RS 4 326 Sets the SMB username or username and password\&. 327 .sp 328 If %password is not specified, the user will be prompted\&. The client will first check the 329 \fBUSER\fR 330 environment variable, then the 331 \fBLOGNAME\fR 332 variable and if either exists, the string is uppercased\&. If these environmental variables are not found, the username 333 \fBGUEST\fR 334 is used\&. 335 .sp 336 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 337 \fI\-A\fR 338 for more details\&. 339 .sp 340 Be cautious about including passwords in scripts\&. Also, on many systems the command line of a running process may be seen via the 341 ps 342 command\&. To be safe always allow 343 rpcclient 344 to prompt for a password and type it in directly\&. 345 .RE 346 .PP 347 \-n|\-\-netbiosname <primary NetBIOS name> 348 .RS 4 349 This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the 350 \m[blue]\fBnetbios name\fR\m[] 351 parameter in the 352 smb\&.conf 353 file\&. However, a command line setting will take precedence over settings in 354 smb\&.conf\&. 355 .RE 356 .PP 357 \-i|\-\-scope <scope> 358 .RS 4 359 This specifies a NetBIOS scope that 360 nmblookup 361 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 362 \fIvery\fR 363 rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with\&. 364 .RE 365 .PP 366 \-W|\-\-workgroup=domain 367 .RS 4 368 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)\&. 369 .RE 370 .PP 371 \-O|\-\-socket\-options socket options 372 .RS 4 373 TCP socket options to set on the client socket\&. See the socket options parameter in the 374 smb\&.conf 375 manual page for the list of valid options\&. 238 When sending or receiving files, smbclient uses an internal buffer sized by the maximum number of allowed requests to the connected server\&. This command allows this size to be set to any range between 0 (which means use the default server controlled size) bytes and 16776960 (0xFFFF00) bytes\&. Using the server controlled size is the most efficient as smbclient will pipeline as many simultaneous reads or writes needed to keep the server as busy as possible\&. Setting this to any other size will slow down the transfer\&. This can also be set using the 239 iosize 240 command inside smbclient\&. 241 .RE 242 .PP 243 \-B|\-\-browse 244 .RS 4 245 Browse SMB servers using DNS\&. 246 .RE 247 .PP 248 \-t|\-\-timeout <timeout\-seconds> 249 .RS 4 250 This allows the user to tune the default timeout used for each SMB request\&. The default setting is 20 seconds\&. Increase it if requests to the server sometimes time out\&. This can happen when SMB3 encryption is selected and smbclient is overwhelming the server with requests\&. This can also be set using the 251 timeout 252 command inside smbclient\&. 376 253 .RE 377 254 .PP … … 380 257 smbclient may be used to create 381 258 tar(1) 382 compatible backups of all the files on an SMB/CIFS share\&. The secondary tar flags that can be given to this option are 259 compatible backups of all the files on an SMB/CIFS share\&. The secondary tar flags that can be given to this option are: 383 260 .sp 384 261 .RS 4 … … 391 268 .\} 392 269 \fIc\fR 393 \- Create a tar file on UNIX\&. Must be followed by the name of a tar file, tape device or "\-" for standard output\&. If using standard output you must turn the log level to its lowest value \-d0 to avoid corrupting your tar file\&. This flag is mutually exclusive with the270 \- Create a tar backup archive on the local system\&. Must be followed by the name of a tar file, tape device or "\-" for standard output\&. If using standard output you must turn the log level to its lowest value \-d0 to avoid corrupting your tar file\&. This flag is mutually exclusive with the 394 271 \fIx\fR 395 272 flag\&. … … 433 310 .\} 434 311 \fIX\fR 435 \- Exclude files and directories\&. Causes files to be excluded from an extract or create\&. See example below\&. Filename globbing works in one of two ways now\&. See312 \- Exclude files and directories\&. Causes files to be excluded from an extract or create\&. See example below\&. Filename globbing works in one of two ways\&. See 436 313 \fIr\fR 437 314 below\&. … … 463 340 .\} 464 341 \fIb\fR 465 \- Blocksize\&. Must be followed by a valid (greater than zero) blocksize\&. Causes tar file to be written out in blocksize*TBLOCK ( usually512 byte) blocks\&.342 \- Blocksize\&. Must be followed by a valid (greater than zero) blocksize\&. Causes tar file to be written out in blocksize*TBLOCK (512 byte) blocks\&. 466 343 .RE 467 344 .sp … … 501 378 .\} 502 379 \fIr\fR 503 \- Regular expression include or exclude\&. Uses regular expression matching for excluding or excluding files if compiled with HAVE_REGEX_H\&. However this mode can be very slow\&. If not compiled with HAVE_REGEX_H, does a limited wildcard match on \*(Aq*\*(Aq and \*(Aq?\*(Aq\&.380 \- Use wildcard matching to include or exclude\&. Deprecated\&. 504 381 .RE 505 382 .sp … … 564 441 Create the same tar file as above, but now use a DOS path name\&. 565 442 .sp 566 smbclient //mypc/myshare "" \-N \- tc backup\&.tar users\eedocs443 smbclient //mypc/myshare "" \-N \-Tc backup\&.tar users\eedocs 567 444 .sp 568 445 Create a tar file of the files listed in the file … … 636 513 .RS 4 637 514 Sets the archive level when operating on files\&. 0 means ignore the archive bit, 1 means only operate on files with this bit set, 2 means only operate on files with this bit set and reset it after operation, 3 means operate on all files and reset it after operation\&. The default is 0\&. 515 .RE 516 .PP 517 backup 518 .RS 4 519 Toggle the state of the "backup intent" flag sent to the server on directory listings and file opens\&. If the "backup intent" flag is true, the server will try and bypass some file system checks if the user has been granted SE_BACKUP or SE_RESTORE privileges\&. This state is useful when performing a backup or restore operation\&. 638 520 .RE 639 521 .PP … … 736 618 iosize <bytes> 737 619 .RS 4 738 When sending or receiving files, smbclient uses an internal memory buffer by default of size 64512 bytes\&. This command allows this size to be set to any range between 16384 (0x4000) bytes and 16776960 (0xFFFF00) bytes\&. Larger sizes may mean more efficient data transfer as smbclient will try and use the most efficient read and write calls for the connected server\&.620 When sending or receiving files, smbclient uses an internal buffer sized by the maximum number of allowed requests to the connected server\&. This command allows this size to be set to any range between 0 (which means use the default server controlled size) bytes and 16776960 (0xFFFF00) bytes\&. Using the server controlled size is the most efficient as smbclient will pipeline as many simultaneous reads or writes needed to keep the server as busy as possible\&. Setting this to any other size will slow down the transfer\&. 739 621 .RE 740 622 .PP … … 766 648 .RS 4 767 649 Establishes a new vuid for this session by logging on again\&. Replaces the current vuid\&. Prints out the new vuid\&. Used for internal Samba testing purposes\&. 650 .RE 651 .PP 652 logoff 653 .RS 4 654 Logs the user off the server, closing the session\&. Used for internal Samba testing purposes\&. 768 655 .RE 769 656 .PP … … 830 717 smbclient 831 718 are binary\&. 719 .RE 720 .PP 721 notify <dir name> 722 .RS 4 723 Query a directory for change notifications\&. This command issues a recursive filechangenotify call for all possible changes\&. As changes come in will print one line per change\&. See 724 https://msdn\&.microsoft\&.com/en\-us/library/dn392331\&.aspx 725 for a description of the action numbers that this command prints\&. 726 .sp 727 This command never ends, it waits for event indefinitely\&. 832 728 .RE 833 729 .PP … … 933 829 .RE 934 830 .PP 831 scopy <source filename> <destination filename> 832 .RS 4 833 Attempt to copy a file on the server using the most efficient server\-side copy calls\&. Falls back to using read then write if server doesn\*(Aqt support server\-side copy\&. 834 .RE 835 .PP 935 836 setmode <filename> <perm=[+|\e\-]rsha> 936 837 .RS 4 … … 960 861 .RS 4 961 862 Performs a tar operation \- see the 962 \fI\-T 863 \fI\-T\fR 963 864 command line option above\&. Behavior may be affected by the tarmode 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\&. 964 865 .RE … … 967 868 .RS 4 968 869 Blocksize\&. Must be followed by a valid (greater than zero) blocksize\&. Causes tar file to be written out in 969 \fIblocksize\fR*TBLOCK (usually 512 byte) blocks\&. 970 .RE 971 .PP 972 tarmode <full|inc|reset|noreset> 973 .RS 4 974 Changes tar\*(Aqs behavior with regard to archive bits\&. In full mode, tar will back up everything regardless of the archive bit setting (this is the default mode)\&. In incremental mode, tar will only back up files with the archive bit set\&. In reset mode, tar will reset the archive bit on all files it backs up (implies read/write share)\&. 870 \fIblocksize\fR*TBLOCK (512 byte) blocks\&. 871 .RE 872 .PP 873 tarmode <full|inc|reset|noreset|system|nosystem|hidden|nohidden> 874 .RS 4 875 Changes tar\*(Aqs behavior with regard to DOS attributes\&. There are 4 modes which can be turned on or off\&. 876 .sp 877 Incremental mode (default off)\&. When off (using 878 full) tar will back up everything regardless of the 879 \fIarchive\fR 880 bit setting\&. When on (using 881 inc), tar will only back up files with the archive bit set\&. 882 .sp 883 Reset mode (default off)\&. When on (using 884 reset), tar will remove the archive bit on all files it backs up (implies read/write share)\&. Use 885 noreset 886 to turn off\&. 887 .sp 888 System mode (default on)\&. When off, tar will not backup system files\&. Use 889 nosystem 890 to turn off\&. 891 .sp 892 Hidden mode (default on)\&. When off, tar will not backup hidden files\&. Use 893 nohidden 894 to turn off\&. 895 .RE 896 .PP 897 timeout <per\-operation timeout in seconds> 898 .RS 4 899 This allows the user to tune the default timeout used for each SMB request\&. The default setting is 20 seconds\&. Increase it if requests to the server sometimes time out\&. This can happen when SMB3 encryption is selected and smbclient is overwhelming the server with requests\&. 975 900 .RE 976 901 .PP … … 988 913 .RS 4 989 914 Changes the currently used vuid in the protocol to the given arbitrary number\&. Without an argument prints out the current vuid being used\&. Used for internal Samba testing purposes\&. 915 .RE 916 .PP 917 tcon <sharename> 918 .RS 4 919 Establishes a new tree connect (connection to a share)\&. Replaces the current tree connect\&. Prints the new tid (tree id)\&. Used for internal Samba testing purposes\&. 920 .RE 921 .PP 922 tdis 923 .RS 4 924 Close the current share connection (tree disconnect)\&. Used for internal Samba testing purposes\&. 925 .RE 926 .PP 927 tid <number> 928 .RS 4 929 Changes the current tree id (tid) in the protocol to a new arbitrary number\&. Without an argument, it prints out the tid currently used\&. Used for internal Samba testing purposes\&. 990 930 .RE 991 931 .SH "NOTES"
Note:
See TracChangeset
for help on using the changeset viewer.