smbclient.1.yo: Documented Andrews changes.
[samba.git] / docs / yodldocs / smbclient.1.yo
1 mailto(samba-bugs@samba.anu.edu.au) 
2
3 manpage(smbclient)(1)(23 Oct 1998)(Samba)(SAMBA)
4
5 label(NAME)
6 manpagename(smbclient)(ftp-like client to access SMB/CIFS resources on servers)
7
8 label(SYNOPSIS)
9 manpagesynopsis()
10
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)(nameresolveorder)] [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)]
12
13 label(DESCRIPTION)
14 manpagedescription()
15
16 This program is part of the bf(Samba) suite.
17
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.
23
24 label(OPTIONS)
25 manpageoptions()
26
27 startdit()
28
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
36
37 tt(//smbserver/printer)
38
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.
43
44 The server name is looked up according to either the
45 link(bf(-R))(nameresolveorder) 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.
49
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.
54
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.)
61
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.
65
66 Be cautious about including passwords in scripts.
67
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.
73
74 label(minusB)
75 dit(bf(-B IP addr)) The IP address to use when sending a broadcast packet.
76
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.
82
83 label(nameresolveorder)
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.
87
88 The options are :"lmhosts", "host", "wins" and "bcast". They cause
89 names to be resolved as follows :
90
91 startit()
92
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.
96
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).  
101
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.
105
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.
112
113 endit()
114
115 If this parameter is not set then the name resolver 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.
119
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.
125
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.
131
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.
135
136 The message is also automatically truncated if the message is over
137 1600 bytes, as this is the limit of the protocol.
138
139 One useful trick is to cat the message through bf(smbclient).
140 For example:
141
142 tt(cat mymessage.txt | smbclient -M FRED)
143
144 will send the message in the file em(mymessage.txt) to the machine FRED.
145
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.
148
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.
152
153 Note: Copy WinPopup into the startup group on your WfWg PCs if you
154 want them to always be able to receive messages.
155
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.
163
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.
168
169 Unless a password is specified on the command line or this parameter
170 is specified, the client will request a password.
171
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.
177
178 label(minusd)
179 dit(bf(-d debuglevel)) debuglevel is an integer from 0 to 10, or the
180 letter 'A'.
181
182 The default value if this parameter is not specified is zero.
183
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.
189
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).
197
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.
201
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.
206
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.
211
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.
216
217 The default base name is specified at compile time.
218
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).
222
223 The log file generated is never removed by the client.
224
225 label(minush)
226 dit(bf(-h)) Print the usage message for the client.
227
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.
231
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))(nameresolveorder) 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.
238
239 There is no default for this parameter. If not supplied, it will be
240 determined automatically by the client as described above.
241
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.
246
247 By default, the client writes messages to standard output - typically
248 the user's tty.
249
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.
255
256 Some servers are fussy about the case of this name, and some insist
257 that it must be a valid NetBIOS name.
258
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.
263
264 If the tt(USER) environment variable containts 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).
269
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()
274
275 tt(-U fred%secret) nl()
276
277 on the command line. Note that there are no spaces around the percent
278 symbol.
279
280 If you specify the password as part of username then the link(bf(-N))(minusN) option
281 (suppress password prompt) is assumed.
282
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.
287
288 The password may also be specified by setting up an environment
289 variable called tt(PASSWORD) 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.
293
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.
297
298 Be cautious about including passwords in scripts or in the
299 tt(PASSWORD) 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.
303
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.
310
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.
319
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.
323
324 label(minusm)
325 dit(bf(-m max protocol level)) With the new code in Samba2.0,
326 bf(smbclient) allways 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.
330
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.
336
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 :
340
341         startdit()
342
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.
348
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 theuir creation times (mtime)
354         set to the date saved in the tar file. Directories currently do not
355         get their creation dates restored properly.
356
357         dit(bf(I)) Include files and directories. Is the default
358         behaviour 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 does not work for
361         included files for extractions (yet).
362
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 does not work for excluded files (yet).
366
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.
370
371         dit(bf(g)) Incremental. Only back up files that have the
372         archive bit set. Useful only with the bf(c) flag.
373
374         dit(bf(q)) Quiet. Keeps tar from printing diagnostics as it
375         works.  This is the same as tarmode quiet.
376
377         dit(bf(N)) Newer than. Must be followed by the name of a file
378         whose date is compared against files found on the share during a
379         create. Only files newer than the file specified are backed up to the
380         tar file. Useful only with the bf(c) flag.
381
382         dit(bf(a)) Set archive bit. Causes the archive bit to be reset
383         when a file is backed up. Useful with the bf(g) and bf(c) flags.
384
385         enddit()
386
387 em(Tar Long File Names)
388
389 smbclient's tar option now supports long file names both on backup and
390 restore. However, the full path name of the file must be less than
391 1024 bytes.  Also, when a tar archive is created, smbclient's tar
392 option places all files in the archive with relative names, not
393 absolute names.
394
395 em(Tar Filenames)
396
397 All file names can be given as DOS path names (with tt(\) as the
398 component separator) or as UNIX path names (with tt(/) as the
399 component separator).
400
401 em(Examples)
402
403 startit()
404
405 it() Restore from tar file backup.tar into myshare on mypc (no password on share).
406
407         tt(smbclient //mypc/myshare "" -N -Tx backup.tar)
408
409 it() Restore everything except users/docs
410
411         tt(smbclient //mypc/myshare "" -N -TXx backup.tar users/docs)
412
413 it() Create a tar file of the files beneath users/docs.
414
415         tt(smbclient //mypc/myshare "" -N -Tc backup.tar users/docs)
416
417 it() Create the same tar file as above, but now use a DOS path name.
418
419         tt(smbclient //mypc/myshare "" -N -tc backup.tar users\edocs)
420
421 it() Create a tar file of all the files and directories in the share.
422
423         tt(smbclient //mypc/myshare "" -N -Tc backup.tar *)
424
425 endit()
426
427 label(minusD)
428 dit(bf(-D initial directory)) Change to initial directory before
429 starting. Probably only of any use with the tar link(bf(-T))(minusT) option.
430
431 label(minusc)
432 dit(bf(-c command string)) command string is a semicolon separated
433 list of commands to be executed instead of prompting from stdin.
434 link(bf(-N))(minusN) is implied by bf(-c).
435
436 This is particularly useful in scripts and for printing stdin to the
437 server, e.g. tt(-c 'print -').
438
439 enddit()
440
441 label(OPERATIONS)
442 manpagesection(OPERATIONS)
443
444 Once the client is running, the user is presented with a prompt :
445
446 tt(smb:\>)
447
448 The backslash ("\") indicates the current working directory on the
449 server, and will change if the current working directory is changed.
450
451 The prompt indicates that the client is ready and waiting to carry out
452 a user command. Each command is a single word, optionally followed by
453 parameters specific to that command. Command and parameters are
454 space-delimited unless these notes specifically state otherwise. All
455 commands are case-insensitive.  Parameters to commands may or may not
456 be case sensitive, depending on the command.
457
458 You can specify file names which have spaces in them by quoting the
459 name with double quotes, for example "a long file name".
460
461 Parameters shown in square brackets (eg., "[parameter]") are
462 optional. If not given, the command will use suitable
463 defaults. Parameters shown in angle brackets (eg., "<parameter>") are
464 required.
465
466 Note that all commands operating on the server are actually performed
467 by issuing a request to the server. Thus the behaviour may vary from
468 server to server, depending on how the server was implemented.
469
470 The commands available are given here in alphabetical order.
471
472 startdit()
473
474 label(questionmark) dit(bf(? [command])) If "command" is specified,
475 the bf(?) command will display a brief informative message about the
476 specified command.  If no command is specified, a list of available
477 commands will be displayed.
478
479 label(exclaimationmark) dit(bf(! [shell command])) If "shell command"
480 is specified, the bf(!)  command will execute a shell locally and run
481 the specified shell command. If no command is specified, a local shell
482 will be run.
483
484 label(cd) dit(bf(cd [directory name])) If "directory name" is
485 specified, the current working directory on the server will be changed
486 to the directory specified. This operation will fail if for any reason
487 the specified directory is inaccessible.
488
489 If no directory name is specified, the current working directory on
490 the server will be reported.
491
492 label(del) dit(bf(del <mask>)) The client will request that the server
493 attempt to delete all files matching "mask" from the current working
494 directory on the server.
495
496 label(dir) dit(bf(dir <mask>)) A list of the files matching "mask" in
497 the current working directory on the server will be retrieved from the
498 server and displayed.
499
500 label(exit) dit(bf(exit)) Terminate the connection with the server and
501 exit from the program.
502
503 label(get) dit(bf(get <remote file name> [local file name])) Copy the
504 file called "remote file name" from the server to the machine running
505 the client. If specified, name the local copy "local file name".  Note
506 that all transfers in smbclient are binary. See also the
507 link(bf(lowercase))(lowercase) command.
508
509 label(help) dit(bf(help [command])) See the link(bf(?))(questionmark)
510 command above.
511
512 label(lcd) dit(bf(lcd [directory name])) If "directory name" is
513 specified, the current working directory on the local machine will
514 be changed to the directory specified. This operation will fail if for
515 any reason the specified directory is inaccessible.
516
517 If no directory name is specified, the name of the current working
518 directory on the local machine will be reported.
519
520 label(lowercase) dit(bf(lowercase)) Toggle lowercasing of filenames
521 for the link(bf(get))(get) and link(bf(mget))(mget) commands.
522
523 When lowercasing is toggled ON, local filenames are converted to
524 lowercase when using the link(bf(get))(get) and link(bf(mget))(mget)
525 commands. This is often useful when copying (say) MSDOS files from a
526 server, because lowercase filenames are the norm on UNIX systems.
527
528 label(ls) dit(bf(ls <mask>)) See the link(bf(dir))(dir) command above.
529
530 label(mask) dit(bf(mask <mask>)) This command allows the user to set
531 up a mask which will be used during recursive operation of the
532 link(bf(mget))(mget) and link(bf(mput))(mput) commands.
533
534 The masks specified to the link(bf(mget))(mget) and
535 link(bf(mput))(mput) commands act as filters for directories rather
536 than files when recursion is toggled ON.
537
538 The mask specified with the .B mask command is necessary to filter
539 files within those directories. For example, if the mask specified in
540 an link(bf(mget))(mget) command is "source*" and the mask specified
541 with the mask command is "*.c" and recursion is toggled ON, the
542 link(bf(mget))(mget) command will retrieve all files matching "*.c" in
543 all directories below and including all directories matching "source*"
544 in the current working directory.
545
546 Note that the value for mask defaults to blank (equivalent to "*") and
547 remains so until the mask command is used to change it. It retains the
548 most recently specified value indefinitely. To avoid unexpected
549 results it would be wise to change the value of .I mask back to "*"
550 after using the link(bf(mget))(mget) or link(bf(mput))(mput) commands.
551
552 label(md) dit(bf(md <directory name>)) See the link(bf(mkdir))(mkdir)
553 command.
554
555 label(mget) dit(bf(mget <mask>)) Copy all files matching mask from the
556 server to the machine running the client.
557
558 Note that mask is interpreted differently during recursive operation
559 and non-recursive operation - refer to the link(bf(recurse))(recurse)
560 and link(bf(mask))(mask) commands for more information. Note that all
561 transfers in .B smbclient are binary. See also the
562 link(bf(lowercase))(lowercase) command.
563
564 label(mkdir) dit(bf(mkdir <directory name>)) Create a new directory on
565 the server (user access privileges permitting) with the specified
566 name.
567
568 label(mput) dit(bf(mput <mask>)) Copy all files matching mask in
569 the current working directory on the local machine to the current
570 working directory on the server.
571
572 Note that mask is interpreted differently during recursive operation
573 and non-recursive operation - refer to the link(bf(recurse))(recurse)
574 and link(bf(mask))(mask) commands for more information. Note that all
575 transfers in .B smbclient are binary.
576
577 label(print) dit(bf(print <file name>)) Print the specified file
578 from the local machine through a printable service on the server.
579
580 See also the link(bf(printmode))(printmode) command.
581
582 label(printmode) dit(bf(printmode <graphics or text>)) Set the print
583 mode to suit either binary data (such as graphical information) or
584 text. Subsequent print commands will use the currently set print
585 mode.
586
587 label(prompt) dir(bf(prompt)) Toggle prompting for filenames during
588 operation of the link(bf(mget))(mget) and link(bf(mput))(mput)
589 commands.
590
591 When toggled ON, the user will be prompted to confirm the transfer of
592 each file during these commands. When toggled OFF, all specified files
593 will be transferred without prompting.
594
595 label(put) dit(bf(put <local file name> [remote file name])) Copy the
596 file called "local file name" from the machine running the client to
597 the server. If specified, name the remote copy "remote file name".
598 Note that all transfers in smbclient are binary. See also the
599 link(bf(lowercase))(lowercase) command.
600
601 label(queue) dir(bf(queue)) Displays the print queue, showing the job
602 id, name, size and current status.
603
604 label(quit) dit(bf(quit)) See the link(bf(exit))(exit) command.
605
606 label(rd) dir(bf(rd <directory name>)) See the link(bf(rmdir))(rmdir)
607 command.
608
609 label(recurse) dir(bf(recurse)) Toggle directory recursion for the
610 commands link(bf(mget))(mget) and link(bf(mput))(mput).
611
612 When toggled ON, these commands will process all directories in the
613 source directory (i.e., the directory they are copying .IR from ) and
614 will recurse into any that match the mask specified to the
615 command. Only files that match the mask specified using the
616 link(bf(mask))(mask) command will be retrieved. See also the
617 link(bf(mask))(mask) command.
618
619 When recursion is toggled OFF, only files from the current working
620 directory on the source machine that match the mask specified to the
621 link(bf(mget))(mget) or link(bf(mput))(mput) commands will be copied,
622 and any mask specified using the link(bf(mask))(mask) command will be
623 ignored.
624
625 label(rm) dir(bf(rm <mask>)) Remove all files matching mask from
626 the current working directory on the server.
627
628 label(rmdir) dit(bf(rmdir <directory name>)) Remove the specified
629 directory (user access privileges permitting) from the server.
630
631 label(tar) dit(bf(tar <c|x>[IXbgNa])) Performs a tar operation - see
632 the link(bf(-T))(minusT) command line option above. Behaviour may be
633 affected by the link(bf(tarmode))(tarmode) command (see below). Using
634 g (incremental) and N (newer) will affect tarmode settings. Note that
635 using the "-" option with tar x may not work - use the command line
636 option instead.
637
638 label(blocksize) dit(bf(blocksize <blocksize>)) Blocksize. Must be
639 followed by a valid (greater than zero) blocksize. Causes tar file to
640 be written out in blocksize*TBLOCK (usually 512 byte) blocks.
641
642 label(tarmode) dir(bf(tarmode <full|inc|reset|noreset>)) Changes tar's
643 behaviour with regard to archive bits. In full mode, tar will back up
644 everything regardless of the archive bit setting (this is the default
645 mode). In incremental mode, tar will only back up files with the
646 archive bit set. In reset mode, tar will reset the archive bit on all
647 files it backs up (implies read/write share).
648
649 label(setmode) dit(bf(setmode <filename> <perm=[+|\-]rsha>)) A version
650 of the DOS attrib command to set file permissions. For example:
651
652 tt(setmode myfile +r)
653
654 would make myfile read only.
655
656 enddit()
657
658 label(NOTES)
659 manpagesection(NOTES)
660
661 Some servers are fussy about the case of supplied usernames,
662 passwords, share names (aka service names) and machine names. If you
663 fail to connect try giving all parameters in uppercase.
664
665 It is often necessary to use the link(bf(-n))(minusn) option when connecting to some
666 types of servers. For example OS/2 LanManager insists on a valid
667 NetBIOS name being used, so you need to supply a valid name that would
668 be known to the server.
669
670 smbclient supports long file names where the server supports the
671 LANMAN2 protocol or above.
672
673 label(ENVIRONMENTVARIABLES)
674 manpagesection(ENVIRONMENT VARIABLES)
675
676 The variable bf(USER) may contain the username of the person using the
677 client.  This information is used only if the protocol level is high
678 enough to support session-level passwords.
679
680 The variable bf(PASSWORD) may contain the password of the person using
681 the client.  This information is used only if the protocol level is
682 high enough to support session-level passwords.
683
684 label(INSTALLATION)
685 manpagesection(INSTALLATION)
686
687 The location of the client program is a matter for individual system
688 administrators. The following are thus suggestions only.
689
690 It is recommended that the smbclient software be installed in the
691 /usr/local/samba/bin or /usr/samba/bin directory, this directory
692 readable by all, writeable only by root. The client program itself
693 should be executable by all. The client should em(NOT) be setuid or
694 setgid!
695
696 The client log files should be put in a directory readable and
697 writable only by the user.
698
699 To test the client, you will need to know the name of a running
700 SMB/CIFS server. It is possible to run url(bf(smbd (8)))(smbd.8.html)
701 an ordinary user - running that server as a daemon on a
702 user-accessible port (typically any port number over 1024) would
703 provide a suitable test server.
704
705 label(DIAGNOSTICS)
706 manpagesection(DIAGNOSTICS)
707
708 Most diagnostics issued by the client are logged in a specified log
709 file. The log file name is specified at compile time, but may be
710 overridden on the command line.
711
712 The number and nature of diagnostics available depends on the debug
713 level used by the client. If you have problems, set the debug level to
714 3 and peruse the log files.
715
716 label(VERSION)
717 manpagesection(VERSION)
718
719 This man page is correct for version 2.0 of the Samba suite.
720
721 label(AUTHOR)
722 manpageauthor()
723
724 The original Samba software and related utilities were created by
725 Andrew Tridgell email(samba-bugs@samba.anu.edu.au). Samba is now developed
726 by the Samba Team as an Open Source project similar to the way the
727 Linux kernel is developed.
728
729 The original Samba man pages were written by Karl Auer. The man page
730 sources were converted to YODL format (another excellent piece of Open
731 Source software) and updated for the Samba2.0 release by Jeremy
732 Allison, email(samba-bugs@samba.anu.edu.au).
733
734 See url(bf(samba (7)))(samba.7.html) to find out how to get a full
735 list of contributors and details on how to submit bug reports,
736 comments etc.