| 1 | '\" t
|
|---|
| 2 | .\" Title: smbclient
|
|---|
| 3 | .\" Author: [see the "AUTHOR" section]
|
|---|
| 4 | .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
|---|
| 5 | .\" Date: 03/06/2011
|
|---|
| 6 | .\" Manual: User Commands
|
|---|
| 7 | .\" Source: Samba 3.5
|
|---|
| 8 | .\" Language: English
|
|---|
| 9 | .\"
|
|---|
| 10 | .TH "SMBCLIENT" "1" "03/06/2011" "Samba 3\&.5" "User Commands"
|
|---|
| 11 | .\" -----------------------------------------------------------------
|
|---|
| 12 | .\" * set default formatting
|
|---|
| 13 | .\" -----------------------------------------------------------------
|
|---|
| 14 | .\" disable hyphenation
|
|---|
| 15 | .nh
|
|---|
| 16 | .\" disable justification (adjust text to left margin only)
|
|---|
| 17 | .ad l
|
|---|
| 18 | .\" -----------------------------------------------------------------
|
|---|
| 19 | .\" * MAIN CONTENT STARTS HERE *
|
|---|
| 20 | .\" -----------------------------------------------------------------
|
|---|
| 21 | .SH "NAME"
|
|---|
| 22 | smbclient \- ftp\-like client to access SMB/CIFS resources on servers
|
|---|
| 23 | .SH "SYNOPSIS"
|
|---|
| 24 | .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] [\-C] [\-g] [\-i\ scope] [\-O\ <socket\ options>] [\-p\ port] [\-R\ <name\ resolve\ order>] [\-s\ <smb\ config\ file>] [\-k] [\-P] [\-c\ <command>]
|
|---|
| 26 | .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] [\-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]
|
|---|
| 28 | .SH "DESCRIPTION"
|
|---|
| 29 | .PP
|
|---|
| 30 | This tool is part of the
|
|---|
| 31 | \fBsamba\fR(7)
|
|---|
| 32 | suite\&.
|
|---|
| 33 | .PP
|
|---|
| 34 | smbclient
|
|---|
| 35 | is a client that can \'talk\' to an SMB/CIFS server\&. It offers an interface similar to that of the ftp program (see
|
|---|
| 36 | \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\&.
|
|---|
| 37 | .SH "OPTIONS"
|
|---|
| 38 | .PP
|
|---|
| 39 | servicename
|
|---|
| 40 | .RS 4
|
|---|
| 41 | servicename is the name of the service you want to use on the server\&. A service name takes the form
|
|---|
| 42 | //server/service
|
|---|
| 43 | where
|
|---|
| 44 | \fIserver \fR
|
|---|
| 45 | is the NetBIOS name of the SMB/CIFS server offering the desired service and
|
|---|
| 46 | \fIservice\fR
|
|---|
| 47 | 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
|
|---|
| 49 | .sp
|
|---|
| 50 | 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\&.
|
|---|
| 51 | .sp
|
|---|
| 52 | The server name is looked up according to either the
|
|---|
| 53 | \fI\-R\fR
|
|---|
| 54 | parameter to
|
|---|
| 55 | smbclient
|
|---|
| 56 | or using the name resolve order parameter in the
|
|---|
| 57 | \fBsmb.conf\fR(5)
|
|---|
| 58 | file, allowing an administrator to change the order and methods by which server names are looked up\&.
|
|---|
| 59 | .RE
|
|---|
| 60 | .PP
|
|---|
| 61 | password
|
|---|
| 62 | .RS 4
|
|---|
| 63 | The password required to access the specified service on the specified server\&. If this parameter is supplied, the
|
|---|
| 64 | \fI\-N\fR
|
|---|
| 65 | option (suppress password prompt) is assumed\&.
|
|---|
| 66 | .sp
|
|---|
| 67 | There is no default password\&. If no password is supplied on the command line (either by using this parameter or adding a password to the
|
|---|
| 68 | \fI\-U\fR
|
|---|
| 69 | option (see below)) and the
|
|---|
| 70 | \fI\-N\fR
|
|---|
| 71 | option is not specified, the client will prompt for a password, even if the desired service does not require one\&. (If no password is required, simply press ENTER to provide a null password\&.)
|
|---|
| 72 | .sp
|
|---|
| 73 | Note: Some servers (including OS/2 and Windows for Workgroups) insist on an uppercase password\&. Lowercase or mixed case passwords may be rejected by these servers\&.
|
|---|
| 74 | .sp
|
|---|
| 75 | Be cautious about including passwords in scripts\&.
|
|---|
| 76 | .RE
|
|---|
| 77 | .PP
|
|---|
| 78 | \-R|\-\-name\-resolve <name resolve order>
|
|---|
| 79 | .RS 4
|
|---|
| 80 | This option is used by the programs in the Samba suite to determine what naming services and in what order to resolve host names to IP addresses\&. The option takes a space\-separated string of different name resolution options\&.
|
|---|
| 81 | .sp
|
|---|
| 82 | The options are :"lmhosts", "host", "wins" and "bcast"\&. They cause names to be resolved as follows:
|
|---|
| 83 | .sp
|
|---|
| 84 | .RS 4
|
|---|
| 85 | .ie n \{\
|
|---|
| 86 | \h'-04'\(bu\h'+03'\c
|
|---|
| 87 | .\}
|
|---|
| 88 | .el \{\
|
|---|
| 89 | .sp -1
|
|---|
| 90 | .IP \(bu 2.3
|
|---|
| 91 | .\}
|
|---|
| 92 | \fBlmhosts\fR: Lookup an IP address in the Samba lmhosts file\&. If the line in lmhosts has no name type attached to the NetBIOS name (see the
|
|---|
| 93 | \fBlmhosts\fR(5)
|
|---|
| 94 | for details) then any name type matches for lookup\&.
|
|---|
| 95 | .RE
|
|---|
| 96 | .sp
|
|---|
| 97 | .RS 4
|
|---|
| 98 | .ie n \{\
|
|---|
| 99 | \h'-04'\(bu\h'+03'\c
|
|---|
|
|---|