added full netbench simulation in smbtorture. It now reads a 4MB load
[Samba/gbeck.git] / docs / yodldocs / smbclient.1.yo
blob29bab4d0fee2efa66c09030234b4ebf27577c728
1 mailto(samba-bugs@samba.org) 
3 manpage(smbclient htmlcommand((1)))(1)(23 Oct 1998)(Samba)(SAMBA)
5 label(NAME)
6 manpagename(smbclient)(ftp-like client to access SMB/CIFS resources on servers)
8 label(SYNOPSIS)
9 manpagesynopsis()
11 bf(smbclient) link(servicename)(servicename) [link(password)(password)] [link(-s smb.conf)(minuss)] [link(-B IP addr)(minusB)] [link(-O socket options)(minusO)][link(-R name resolve order)(minusR)] [link(-M NetBIOS name)(minusM)] [link(-i scope)(minusi)] [link(-N)(minusN)] [link(-n NetBIOS name)(minusn)] [link(-d debuglevel)(minusd)] [link(-P)(minusP)] [link(-p port)(minusp)] [link(-l log basename)(minusl)] [link(-h)(minush)] [link(-I dest IP)(minusI)] [link(-E)(minusE)] [link(-U username)(minusU)] [link(-L NetBIOS name)(minusL)] [link(-t terminal code)(minust)] [link(-m max protocol)(minusm)] [link(-W workgroup)(minusW)] [link(-T<c|x>IXFqgbNan)(minusT)] [link(-D directory)(minusD)] [link(-c command string)(minusc)]
13 label(DESCRIPTION)
14 manpagedescription()
16 This program is part of the bf(Samba) suite.
18 bf(smbclient) is a client that can 'talk' to an SMB/CIFS server. It
19 offers an interface similar to that of the ftp program (see bf(ftp
20 (1))).  Operations include things like getting files from the server
21 to the local machine, putting files from the local machine to the
22 server, retrieving directory information from the server and so on.
24 label(OPTIONS)
25 manpageoptions()
27 startdit()
29 label(servicename)
30 dit(bf(servicename)) servicename is the name of the service you want
31 to use on the server. A service name takes the form
32 tt(//server/service) where em(server) is the NetBIOS name of the SMB/CIFS
33 server offering the desired service and em(service) is the name
34 of the service offered. Thus to connect to the service em(printer) on
35 the SMB/CIFS server em(smbserver), you would use the servicename
37 tt(//smbserver/printer)
39 Note that the server name required is NOT necessarily the IP (DNS)
40 host name of the server ! The name required is a NetBIOS server name,
41 which may or may not be the same as the IP hostname of the machine
42 running the server.
44 The server name is looked up according to either the
45 link(bf(-R))(minusR) parameter to bf(smbclient) or using the
46 url(bf(name resolve order))(smb.conf.5.html#nameresolveorder)
47 parameter in the smb.conf file, allowing an administrator to change
48 the order and methods by which server names are looked up.
50 label(password)
51 dit(bf(password)) password is the password required to access the
52 specified service on the specified server. If this parameter is
53 supplied, the link(bf(-N))(minusN) option (suppress password prompt) is assumed.
55 There is no default password. If no password is supplied on the
56 command line (either by using this parameter or adding a password to
57 the link(bf(-U))(minusU) option (see below)) and the link(bf(-N))(minusN) option is not specified,
58 the client will prompt for a password, even if the desired service
59 does not require one. (If no password is required, simply press ENTER
60 to provide a null password.)
62 Note: Some servers (including OS/2 and Windows for Workgroups) insist
63 on an uppercase password. Lowercase or mixed case passwords may be
64 rejected by these servers.
66 Be cautious about including passwords in scripts.
68 label(minuss)
69 dit(bf(-s smb.conf)) This parameter specifies the pathname to the
70 Samba configuration file, smb.conf. This file controls all aspects of
71 the Samba setup on the machine and smbclient also needs to read this
72 file.
74 label(minusB)
75 dit(bf(-B IP addr)) The IP address to use when sending a broadcast packet.
77 label(minusO)
78 dit(bf(-O socket options)) TCP socket options to set on the client
79 socket. See the url(socket options)(smb.conf.5.html#socketoptions)
80 parameter in the url(bf(smb.conf (5)))(smb.conf.5.html) manpage for
81 the list of valid options.
83 label(minusR)
84 dit(bf(-R name resolve order)) This option allows the user of
85 smbclient to determine what name resolution services to use when
86 looking up the NetBIOS name of the host being connected to.
88 The options are :"lmhosts", "host", "wins" and "bcast". They cause
89 names to be resolved as follows :
91 startit()
93 it() bf(lmhosts) : Lookup an IP address in the Samba lmhosts file.
94 The lmhosts file is stored in the same directory as the
95 url(bf(smb.conf))(smb.conf.5.html) file.
97 it() bf(host) : Do a standard host name to IP address resolution,
98 using the system /etc/hosts, NIS, or DNS lookups. This method of name
99 resolution is operating system depended for instance on IRIX or
100 Solaris this may be controlled by the em(/etc/nsswitch.conf) file).  
102 it() bf(wins) : Query a name with the IP address listed in the url(bf(wins
103 server))(smb.conf.5.html#winsserver) parameter in the smb.conf file. If 
104 no WINS server has been specified this method will be ignored.
106 it() bf(bcast) : Do a broadcast on each of the known local interfaces
107 listed in the url(bf(interfaces))(smb.conf.5.html#interfaces) parameter
108 in the smb.conf file. This is the least reliable of the name resolution
109 methods as it depends on the target host being on a locally connected
110 subnet. To specify a particular broadcast address the link(bf(-B))(minusB) option 
111 may be used.
113 endit()
115 If this parameter is not set then the name resolve order defined
116 in the url(bf(smb.conf))(smb.conf.5.html) file parameter 
117 url((bf(name resolve order)))(smb.conf.5.html#nameresolveorder)
118 will be used.
120 The default order is lmhosts, host, wins, bcast and without this
121 parameter or any entry in the url(bf("name resolve
122 order"))(smb.conf.5.html#nameresolveorder) parameter of the
123 url(bf(smb.conf))(smb.conf.5.html) file the name resolution methods
124 will be attempted in this order.
126 label(minusM)
127 dit(bf(-M NetBIOS name)) This options allows you to send messages,
128 using the "WinPopup" protocol, to another computer. Once a connection
129 is established you then type your message, pressing ^D (control-D) to
130 end.
132 If the receiving computer is running WinPopup the user will receive
133 the message and probably a beep. If they are not running WinPopup the
134 message will be lost, and no error message will occur.
136 The message is also automatically truncated if the message is over
137 1600 bytes, as this is the limit of the protocol.
139 One useful trick is to cat the message through bf(smbclient).
140 For example:
142 tt(cat mymessage.txt | smbclient -M FRED)
144 will send the message in the file em(mymessage.txt) to the machine FRED.
146 You may also find the link(bf(-U))(minusU) and link(bf(-I))(minusI) options useful, as they allow
147 you to control the FROM and TO parts of the message.
149 See the url(bf(message command))(smb.conf.5.html#messagecommand)
150 parameter in the bf(smb.conf (5)) for a description of how to handle
151 incoming WinPopup messages in Samba.
153 Note: Copy WinPopup into the startup group on your WfWg PCs if you
154 want them to always be able to receive messages.
156 label(minusi)
157 dit(bf(-i scope)) This specifies a NetBIOS scope that smbclient will use
158 to communicate with when generating NetBIOS names. For details on the
159 use of NetBIOS scopes, see rfc1001.txt and rfc1002.txt. NetBIOS scopes
160 are em(very) rarely used, only set this parameter if you are the
161 system administrator in charge of all the NetBIOS systems you
162 communicate with.
164 label(minusN)
165 dit(bf(-N)) If specified, this parameter suppresses the normal
166 password prompt from the client to the user. This is useful when
167 accessing a service that does not require a password.
169 Unless a password is specified on the command line or this parameter
170 is specified, the client will request a password.
172 label(minusn)
173 dit(bf(-n NetBIOS name)) By default, the client will use the local
174 machine's hostname (in uppercase) as its NetBIOS name. This parameter
175 allows you to override the host name and use whatever NetBIOS name you
176 wish.
178 label(minusd)
179 dit(bf(-d debuglevel)) debuglevel is an integer from 0 to 10, or the
180 letter 'A'.
182 The default value if this parameter is not specified is zero.
184 The higher this value, the more detail will be logged to the log files
185 about the activities of the client. At level 0, only critical errors
186 and serious warnings will be logged. Level 1 is a reasonable level for
187 day to day running - it generates a small amount of information about
188 operations carried out.
190 Levels above 1 will generate considerable amounts of log data, and
191 should only be used when investigating a problem. Levels above 3 are
192 designed for use only by developers and generate HUGE amounts of log
193 data, most of which is extremely cryptic. If debuglevel is set to the
194 letter 'A', then em(all) debug messages will be printed. This setting
195 is for developers only (and people who em(really) want to know how the
196 code works internally).
198 Note that specifying this parameter here will override the url(bf(log
199 level))(smb.conf.5.html#loglevel) parameter in the url(bf(smb.conf
200 (5)))(smb.conf.5.html) file.
202 label(minusP)
203 dit(bf(-P)) This option is no longer used. The code in Samba2.0
204 now lets the server decide the device type, so no printer specific
205 flag is needed.
207 label(minusp)
208 dit(bf(-p port)) This number is the TCP port number that will be used
209 when making connections to the server. The standard (well-known) TCP
210 port number for an SMB/CIFS server is 139, which is the default.
212 label(minusl)
213 dit(bf(-l logfilename)) If specified, logfilename specifies a base
214 filename into which operational data from the running client will be
215 logged.
217 The default base name is specified at compile time.
219 The base name is used to generate actual log file names. For example,
220 if the name specified was "log", the debug file would be
221 tt(log.client).
223 The log file generated is never removed by the client.
225 label(minush)
226 dit(bf(-h)) Print the usage message for the client.
228 label(minusI)
229 dit(bf(-I IP address)) IP address is the address of the server to
230 connect to. It should be specified in standard "a.b.c.d" notation.
232 Normally the client would attempt to locate a named SMB/CIFS server by
233 looking it up via the NetBIOS name resolution mechanism described
234 above in the link(bf(name resolve order))(minusR) parameter
235 above. Using this parameter will force the client to assume that the
236 server is on the machine with the specified IP address and the NetBIOS
237 name component of the resource being connected to will be ignored.
239 There is no default for this parameter. If not supplied, it will be
240 determined automatically by the client as described above.
242 label(minusE)
243 dit(bf(-E)) This parameter causes the client to write messages to the
244 standard error stream (stderr) rather than to the standard output
245 stream.
247 By default, the client writes messages to standard output - typically
248 the user's tty.
250 label(minusU)
251 dit(bf(-U username)) This specifies the user name that will be used by
252 the client to make a connection, assuming your server is not a downlevel
253 server that is running a protocol level that uses passwords on shares,
254 not on usernames.
256 Some servers are fussy about the case of this name, and some insist
257 that it must be a valid NetBIOS name.
259 If no username is supplied, it will default to an uppercase version of
260 the environment variable tt(USER) or tt(LOGNAME) in that order.  If no
261 username is supplied and neither environment variable exists the
262 username "GUEST" will be used.
264 If the tt(USER) environment variable contains a '%' character,
265 everything after that will be treated as a password. This allows you
266 to set the environment variable to be tt(USER=username%password) so
267 that a password is not passed on the command line (where it may be
268 seen by the ps command).
270 If the service you are connecting to requires a password, it can be
271 supplied using the link(bf(-U))(minusU) option, by appending a percent symbol ("%")
272 then the password to username.  For example, to attach to a service as
273 user tt("fred") with password tt("secret"), you would specify. nl()
275 tt(-U fred%secret) nl()
277 on the command line. Note that there are no spaces around the percent
278 symbol.
280 If you specify the password as part of username then the link(bf(-N))(minusN) option
281 (suppress password prompt) is assumed.
283 If you specify the password as a parameter em(AND) as part of username
284 then the password as part of username will take precedence. Putting
285 nothing before or nothing after the percent symbol will cause an empty
286 username or an empty password to be used, respectively.
288 The password may also be specified by setting up an environment
289 variable called tt(PASSWD) that contains the users password. Note
290 that this may be very insecure on some systems but on others allows
291 users to script smbclient commands without having a password appear in
292 the command line of a process listing.
294 Note: Some servers (including OS/2 and Windows for Workgroups) insist
295 on an uppercase password. Lowercase or mixed case passwords may be
296 rejected by these servers.
298 Be cautious about including passwords in scripts or in the
299 tt(PASSWD) environment variable. Also, on many systems the command
300 line of a running process may be seen via the tt(ps) command to be
301 safe always allow smbclient to prompt for a password and type it in
302 directly.
304 label(minusL)
305 dit(bf(-L)) This option allows you to look at what services are
306 available on a server. You use it as tt("smbclient -L host") and a
307 list should appear.  The link(bf(-I))(minusI) option may be useful if your NetBIOS
308 names don't match your tcp/ip dns host names or if you are trying to
309 reach a host on another network.
311 label(minust)
312 dit(bf(-t terminal code)) This option tells smbclient how to interpret
313 filenames coming from the remote server. Usually Asian language
314 multibyte UNIX implementations use different character sets than
315 SMB/CIFS servers (em(EUC) instead of em(SJIS) for example). Setting
316 this parameter will let smbclient convert between the UNIX filenames
317 and the SMB filenames correctly. This option has not been seriously
318 tested and may have some problems.
320 The terminal codes include tt(sjis), tt(euc), tt(jis7), tt(jis8),
321 tt(junet), tt(hex), tt(cap). This is not a complete list, check the
322 Samba source code for the complete list.
324 label(minusm)
325 dit(bf(-m max protocol level)) With the new code in Samba2.0,
326 bf(smbclient) always attempts to connect at the maximum
327 protocols level the server supports. This parameter is
328 preserved for backwards compatibility, but any string
329 following the bf(-m) will be ignored.
331 label(minusW)
332 dit(bf(-W WORKGROUP)) Override the default workgroup specified in the
333 url(bf(workgroup))(smb.conf.5.html#workgroup) parameter of the
334 url(bf(smb.conf))(smb.conf.5.html) file for this connection. This may
335 be needed to connect to some servers.
337 label(minusT) dit(bf(-T tar options)) smbclient may be used to create
338 bf(tar (1)) compatible backups of all the files on an SMB/CIFS
339 share. The secondary tar flags that can be given to this option are :
341         startdit()
343         dit(bf(c)) Create a tar file on UNIX. Must be followed by the
344         name of a tar file, tape device or tt("-") for standard output. If
345         using standard output you must turn the log level to its lowest value
346     tt(-d0) to avoid corrupting your tar file. This flag is
347         mutually exclusive with the bf(x) flag.
349         dit(bf(x)) Extract (restore) a local tar file back to a
350         share. Unless the link(bf(-D))(minusD) option is given, the tar files will be
351         restored from the top level of the share. Must be followed by the name
352         of the tar file, device or tt("-") for standard input. Mutually exclusive
353         with the bf(c) flag. Restored files have their creation times (mtime)
354         set to the date saved in the tar file. Directories currently do not
355         get their creation dates restored properly.
357         dit(bf(I)) Include files and directories. Is the default
358         behavior when filenames are specified above. Causes tar files to
359         be included in an extract or create (and therefore everything else to
360         be excluded). See example below.  Filename globbing works 
361         in one of two ways.  See bf(r) below.
363         dit(bf(X)) Exclude files and directories. Causes tar files to
364         be excluded from an extract or create. See example below.  Filename
365         globbing works in one of two ways now. See bf(r) below.
367         dit(bf(b)) Blocksize. Must be followed by a valid (greater than
368         zero) blocksize.  Causes tar file to be written out in
369         blocksize*TBLOCK (usually 512 byte) blocks.
371         dit(bf(g)) Incremental. Only back up files that have the
372         archive bit set. Useful only with the bf(c) flag.
374         dit(bf(q)) Quiet. Keeps tar from printing diagnostics as it
375         works.  This is the same as tarmode quiet.
377         dit(bf(r)) Regular expression include or exclude.  Uses regular 
378         regular expression matching for excluding or excluding files if 
379         compiled with HAVE_REGEX_H. However this mode can be very slow. If 
380         not compiled with HAVE_REGEX_H, does a limited wildcard match on * and 
381         ?.
383         dit(bf(N)) Newer than. Must be followed by the name of a file
384         whose date is compared against files found on the share during a
385         create. Only files newer than the file specified are backed up to the
386         tar file. Useful only with the bf(c) flag.
388         dit(bf(a)) Set archive bit. Causes the archive bit to be reset
389         when a file is backed up. Useful with the bf(g) and bf(c) flags.
391         enddit()
393 em(Tar Long File Names)
395 smbclient's tar option now supports long file names both on backup and
396 restore. However, the full path name of the file must be less than
397 1024 bytes.  Also, when a tar archive is created, smbclient's tar
398 option places all files in the archive with relative names, not
399 absolute names.
401 em(Tar Filenames)
403 All file names can be given as DOS path names (with tt(\) as the
404 component separator) or as UNIX path names (with tt(/) as the
405 component separator).
407 em(Examples)
409 startit()
411 it() Restore from tar file backup.tar into myshare on mypc (no password on share).
413         tt(smbclient //mypc/myshare "" -N -Tx backup.tar)
415 it() Restore everything except users/docs
417         tt(smbclient //mypc/myshare "" -N -TXx backup.tar users/docs)
419 it() Create a tar file of the files beneath users/docs.
421         tt(smbclient //mypc/myshare "" -N -Tc backup.tar users/docs)
423 it() Create the same tar file as above, but now use a DOS path name.
425         tt(smbclient //mypc/myshare "" -N -tc backup.tar users\edocs)
427 it() Create a tar file of all the files and directories in the share.
429         tt(smbclient //mypc/myshare "" -N -Tc backup.tar *)
431 endit()
433 label(minusD)
434 dit(bf(-D initial directory)) Change to initial directory before
435 starting. Probably only of any use with the tar link(bf(-T))(minusT) option.
437 label(minusc)
438 dit(bf(-c command string)) command string is a semicolon separated
439 list of commands to be executed instead of prompting from stdin.
440 link(bf(-N))(minusN) is implied by bf(-c).
442 This is particularly useful in scripts and for printing stdin to the
443 server, e.g. tt(-c 'print -').
445 enddit()
447 label(OPERATIONS)
448 manpagesection(OPERATIONS)
450 Once the client is running, the user is presented with a prompt :
452 tt(smb:\>)
454 The backslash ("\") indicates the current working directory on the
455 server, and will change if the current working directory is changed.
457 The prompt indicates that the client is ready and waiting to carry out
458 a user command. Each command is a single word, optionally followed by
459 parameters specific to that command. Command and parameters are
460 space-delimited unless these notes specifically state otherwise. All
461 commands are case-insensitive.  Parameters to commands may or may not
462 be case sensitive, depending on the command.
464 You can specify file names which have spaces in them by quoting the
465 name with double quotes, for example "a long file name".
467 Parameters shown in square brackets (e.g., "[parameter]") are
468 optional. If not given, the command will use suitable
469 defaults. Parameters shown in angle brackets (e.g., "<parameter>") are
470 required.
472 Note that all commands operating on the server are actually performed
473 by issuing a request to the server. Thus the behavior may vary from
474 server to server, depending on how the server was implemented.
476 The commands available are given here in alphabetical order.
478 startdit()
480 label(questionmark) dit(bf(? [command])) If "command" is specified,
481 the bf(?) command will display a brief informative message about the
482 specified command.  If no command is specified, a list of available
483 commands will be displayed.
485 label(exclaimationmark) dit(bf(! [shell command])) If "shell command"
486 is specified, the bf(!)  command will execute a shell locally and run
487 the specified shell command. If no command is specified, a local shell
488 will be run.
490 label(cd) dit(bf(cd [directory name])) If "directory name" is
491 specified, the current working directory on the server will be changed
492 to the directory specified. This operation will fail if for any reason
493 the specified directory is inaccessible.
495 If no directory name is specified, the current working directory on
496 the server will be reported.
498 label(del) dit(bf(del <mask>)) The client will request that the server
499 attempt to delete all files matching "mask" from the current working
500 directory on the server.
502 label(dir) dit(bf(dir <mask>)) A list of the files matching "mask" in
503 the current working directory on the server will be retrieved from the
504 server and displayed.
506 label(exit) dit(bf(exit)) Terminate the connection with the server and
507 exit from the program.
509 label(get) dit(bf(get <remote file name> [local file name])) Copy the
510 file called "remote file name" from the server to the machine running
511 the client. If specified, name the local copy "local file name".  Note
512 that all transfers in smbclient are binary. See also the
513 link(bf(lowercase))(lowercase) command.
515 label(help) dit(bf(help [command])) See the link(bf(?))(questionmark)
516 command above.
518 label(lcd) dit(bf(lcd [directory name])) If "directory name" is
519 specified, the current working directory on the local machine will
520 be changed to the directory specified. This operation will fail if for
521 any reason the specified directory is inaccessible.
523 If no directory name is specified, the name of the current working
524 directory on the local machine will be reported.
526 label(lowercase) dit(bf(lowercase)) Toggle lowercasing of filenames
527 for the link(bf(get))(get) and link(bf(mget))(mget) commands.
529 When lowercasing is toggled ON, local filenames are converted to
530 lowercase when using the link(bf(get))(get) and link(bf(mget))(mget)
531 commands. This is often useful when copying (say) MSDOS files from a
532 server, because lowercase filenames are the norm on UNIX systems.
534 label(ls) dit(bf(ls <mask>)) See the link(bf(dir))(dir) command above.
536 label(mask) dit(bf(mask <mask>)) This command allows the user to set
537 up a mask which will be used during recursive operation of the
538 link(bf(mget))(mget) and link(bf(mput))(mput) commands.
540 The masks specified to the link(bf(mget))(mget) and
541 link(bf(mput))(mput) commands act as filters for directories rather
542 than files when recursion is toggled ON.
544 The mask specified with the .B mask command is necessary to filter
545 files within those directories. For example, if the mask specified in
546 an link(bf(mget))(mget) command is "source*" and the mask specified
547 with the mask command is "*.c" and recursion is toggled ON, the
548 link(bf(mget))(mget) command will retrieve all files matching "*.c" in
549 all directories below and including all directories matching "source*"
550 in the current working directory.
552 Note that the value for mask defaults to blank (equivalent to "*") and
553 remains so until the mask command is used to change it. It retains the
554 most recently specified value indefinitely. To avoid unexpected
555 results it would be wise to change the value of .I mask back to "*"
556 after using the link(bf(mget))(mget) or link(bf(mput))(mput) commands.
558 label(md) dit(bf(md <directory name>)) See the link(bf(mkdir))(mkdir)
559 command.
561 label(mget) dit(bf(mget <mask>)) Copy all files matching mask from the
562 server to the machine running the client.
564 Note that mask is interpreted differently during recursive operation
565 and non-recursive operation - refer to the link(bf(recurse))(recurse)
566 and link(bf(mask))(mask) commands for more information. Note that all
567 transfers in .B smbclient are binary. See also the
568 link(bf(lowercase))(lowercase) command.
570 label(mkdir) dit(bf(mkdir <directory name>)) Create a new directory on
571 the server (user access privileges permitting) with the specified
572 name.
574 label(mput) dit(bf(mput <mask>)) Copy all files matching mask in
575 the current working directory on the local machine to the current
576 working directory on the server.
578 Note that mask is interpreted differently during recursive operation
579 and non-recursive operation - refer to the link(bf(recurse))(recurse)
580 and link(bf(mask))(mask) commands for more information. Note that all
581 transfers in .B smbclient are binary.
583 label(print) dit(bf(print <file name>)) Print the specified file
584 from the local machine through a printable service on the server.
586 See also the link(bf(printmode))(printmode) command.
588 label(printmode) dit(bf(printmode <graphics or text>)) Set the print
589 mode to suit either binary data (such as graphical information) or
590 text. Subsequent print commands will use the currently set print
591 mode.
593 label(prompt) dit(bf(prompt)) Toggle prompting for filenames during
594 operation of the link(bf(mget))(mget) and link(bf(mput))(mput)
595 commands.
597 When toggled ON, the user will be prompted to confirm the transfer of
598 each file during these commands. When toggled OFF, all specified files
599 will be transferred without prompting.
601 label(put) dit(bf(put <local file name> [remote file name])) Copy the
602 file called "local file name" from the machine running the client to
603 the server. If specified, name the remote copy "remote file name".
604 Note that all transfers in smbclient are binary. See also the
605 link(bf(lowercase))(lowercase) command.
607 label(queue) dit(bf(queue)) Displays the print queue, showing the job
608 id, name, size and current status.
610 label(quit) dit(bf(quit)) See the link(bf(exit))(exit) command.
612 label(rd) dit(bf(rd <directory name>)) See the link(bf(rmdir))(rmdir)
613 command.
615 label(recurse) dit(bf(recurse)) Toggle directory recursion for the
616 commands link(bf(mget))(mget) and link(bf(mput))(mput).
618 When toggled ON, these commands will process all directories in the
619 source directory (i.e., the directory they are copying .IR from ) and
620 will recurse into any that match the mask specified to the
621 command. Only files that match the mask specified using the
622 link(bf(mask))(mask) command will be retrieved. See also the
623 link(bf(mask))(mask) command.
625 When recursion is toggled OFF, only files from the current working
626 directory on the source machine that match the mask specified to the
627 link(bf(mget))(mget) or link(bf(mput))(mput) commands will be copied,
628 and any mask specified using the link(bf(mask))(mask) command will be
629 ignored.
631 label(rm) dit(bf(rm <mask>)) Remove all files matching mask from
632 the current working directory on the server.
634 label(rmdir) dit(bf(rmdir <directory name>)) Remove the specified
635 directory (user access privileges permitting) from the server.
637 label(tar) dit(bf(tar <c|x>[IXbgNa])) Performs a tar operation - see
638 the link(bf(-T))(minusT) command line option above. Behavior may be
639 affected by the link(bf(tarmode))(tarmode) command (see below). Using
640 g (incremental) and N (newer) will affect tarmode settings. Note that
641 using the "-" option with tar x may not work - use the command line
642 option instead.
644 label(blocksize) dit(bf(blocksize <blocksize>)) Blocksize. Must be
645 followed by a valid (greater than zero) blocksize. Causes tar file to
646 be written out in blocksize*TBLOCK (usually 512 byte) blocks.
648 label(tarmode) dit(bf(tarmode <full|inc|reset|noreset>)) Changes tar's
649 behavior with regard to archive bits. In full mode, tar will back up
650 everything regardless of the archive bit setting (this is the default
651 mode). In incremental mode, tar will only back up files with the
652 archive bit set. In reset mode, tar will reset the archive bit on all
653 files it backs up (implies read/write share).
655 label(setmode) dit(bf(setmode <filename> <perm=[+|\-]rsha>)) A version
656 of the DOS attrib command to set file permissions. For example:
658 tt(setmode myfile +r)
660 would make myfile read only.
662 enddit()
664 label(NOTES)
665 manpagesection(NOTES)
667 Some servers are fussy about the case of supplied usernames,
668 passwords, share names (AKA service names) and machine names. If you
669 fail to connect try giving all parameters in uppercase.
671 It is often necessary to use the link(bf(-n))(minusn) option when connecting to some
672 types of servers. For example OS/2 LanManager insists on a valid
673 NetBIOS name being used, so you need to supply a valid name that would
674 be known to the server.
676 smbclient supports long file names where the server supports the
677 LANMAN2 protocol or above.
679 label(ENVIRONMENTVARIABLES)
680 manpagesection(ENVIRONMENT VARIABLES)
682 The variable bf(USER) may contain the username of the person using the
683 client.  This information is used only if the protocol level is high
684 enough to support session-level passwords.
686 The variable bf(PASSWD) may contain the password of the person using
687 the client.  This information is used only if the protocol level is
688 high enough to support session-level passwords.
690 label(INSTALLATION)
691 manpagesection(INSTALLATION)
693 The location of the client program is a matter for individual system
694 administrators. The following are thus suggestions only.
696 It is recommended that the smbclient software be installed in the
697 /usr/local/samba/bin or /usr/samba/bin directory, this directory
698 readable by all, writeable only by root. The client program itself
699 should be executable by all. The client should em(NOT) be setuid or
700 setgid!
702 The client log files should be put in a directory readable and
703 writeable only by the user.
705 To test the client, you will need to know the name of a running
706 SMB/CIFS server. It is possible to run url(bf(smbd (8)))(smbd.8.html)
707 an ordinary user - running that server as a daemon on a
708 user-accessible port (typically any port number over 1024) would
709 provide a suitable test server.
711 label(DIAGNOSTICS)
712 manpagesection(DIAGNOSTICS)
714 Most diagnostics issued by the client are logged in a specified log
715 file. The log file name is specified at compile time, but may be
716 overridden on the command line.
718 The number and nature of diagnostics available depends on the debug
719 level used by the client. If you have problems, set the debug level to
720 3 and peruse the log files.
722 label(VERSION)
723 manpagesection(VERSION)
725 This man page is correct for version 2.0 of the Samba suite.
727 label(AUTHOR)
728 manpageauthor()
730 The original Samba software and related utilities were created by
731 Andrew Tridgell email(samba-bugs@samba.org). Samba is now developed
732 by the Samba Team as an Open Source project similar to the way the
733 Linux kernel is developed.
735 The original Samba man pages were written by Karl Auer. The man page
736 sources were converted to YODL format (another excellent piece of Open
737 Source software, available at
738 url(bf(ftp://ftp.icce.rug.nl/pub/unix/))(ftp://ftp.icce.rug.nl/pub/unix/))
739 and updated for the Samba2.0 release by Jeremy Allison.
740 email(samba-bugs@samba.org).
742 See url(bf(samba (7)))(samba.7.html) to find out how to get a full
743 list of contributors and details on how to submit bug reports,
744 comments etc.