preparing for release of 2.0.0 alpha 11
[ira/wip.git] / docs / manpages / smbclient.1
1 .TH SMBCLIENT 1 "09 Oct 1998" "smbclient 2.0.0-alpha11"
2 .SH NAME
3 smbclient \- ftp-like Lan Manager client program
4 .SH SYNOPSIS
5 .B smbclient
6 .B servicename
7 [
8 .B password
9 ] [
10 .B \-A
11 ] [
12 .B \-E
13 ] [
14 .B \-L
15 .I host
16 ] [
17 .B \-M
18 .I host
19 ] [
20 .B \-I
21 .I IP number
22 ] [
23 .B \-R
24 .I name resolve order
25 ] [
26 .B \-N
27 ] [
28 .B \-P
29 ] [
30 .B \-U
31 .I username
32 ] [
33 .B \-d
34 .I debuglevel
35 ] [
36 .B \-l
37 .I log basename
38 ] [
39 .B \-n
40 .I netbios name
41 ] [
42 .B \-W
43 .I workgroup
44 ] [
45 .B \-O
46 .I socket options
47 ] [
48 .B \-p
49 .I port number
50 ] [
51 .B \-c
52 .I command string
53 ] [
54 .B \-T
55 .I tar options
56 ] [
57 .B \-D
58 .I initial directory
59 ]
60 .SH DESCRIPTION
61 This program is part of the Samba suite.
62
63 .B smbclient
64 is a client that can 'talk' to a Lan Manager server. It offers
65 an interface similar to that of the 
66 .B ftp
67 program (see
68 .BR ftp (1)).
69 Operations include things like getting files from the
70 server to the local machine, putting files from the local machine to
71 the server, retrieving directory information from the server and so on.
72 .SH OPTIONS
73 .B servicename
74 .RS 3
75 .B servicename
76 is the name of the service you want to use on the server. A service
77 name takes the form
78 .B "\e\eserver\eservice"
79 where
80 .B server
81 is the netbios name of the Lan Manager server offering the desired service and
82 .B service
83 is the name of the service offered. Thus to connect to the service "printer" 
84 on the Lan Manager server "lanman", you would use the servicename
85
86 .RS 10
87 .B "\e\elanman\eprinter"
88 .RE
89
90 Note that the server name required is NOT necessarily the host name of the
91 server! The name required is a Lan Manager server name, which may or may not
92 be the same as the hostname of the machine running the server.
93
94 With Samba 1.9.18p4 the server name is looked up according to the
95 "name resolve order=" parameter in the smb.conf file, allowing an
96 administrator to change the order and methods by which server names
97 are looked up.
98 .RE
99
100 .B password
101 .RS 3
102 .B
103 password
104 is the password required to access the specified service on the
105 specified server. If supplied, the
106 .B \-N
107 option (suppress password prompt) is assumed.
108
109 There is no default password. If no password is supplied on the command line
110 (either here or using the 
111 .B \-U
112 option (see below)) and 
113 .B \-N
114 is not specified, the client will prompt for a password, even if the desired 
115 service does not require one. (If no password is 
116 required, simply press ENTER to provide a null password.)
117
118 Note: Some servers (including OS/2 and Windows for Workgroups) insist
119 on an uppercase password. Lowercase or mixed case passwords may be
120 rejected by these servers.
121
122 Be cautious about including passwords in scripts.
123 .RE
124
125 .B \-R name resolve order
126
127 .RS 3
128 This parameter will override the default name resolution order of the
129 server listed in the "name resolve order" parameter in smb.conf. This
130 is useful to force name resolution to take place by a particular method.
131 This command line parameter only exists in Samba 1.9.18p4 and above.
132 .RE
133
134 .B \-A
135
136 .RS 3
137 This parameter, if specified, causes the maximum debug level to be selected.
138 Be warned that this generates prodigious amounts of debug data. There is also
139 a security issue involved, as at the maximum debug level cleartext passwords
140 may be written to some log files.
141 .RE
142
143 .B \-L
144
145 .RS 3
146 This option allows you to look at what services are available on a
147 server. You use it as "smbclient -L host" and a list should appear.
148 The
149 .B \-I
150 option may be useful if your netbios names don't match your 
151 tcp/ip host names or if you are trying to reach a host on another
152 network. For example:
153
154 smbclient -L ftp -I ftp.microsoft.com
155
156 will list the shares available on Microsoft's public server.
157 .RE
158
159 .B \-M
160
161 .RS 3
162 This options allows you to send messages, using the "WinPopup"
163 protocol, to another computer. Once a connection is established you
164 then type your message, pressing ^D (control-D) to end.
165
166 If the receiving computer is running WinPopup the user will receive
167 the message and probably a beep. If they are not running WinPopup the
168 message will be lost, and no error message will occur.
169
170 The message is also automatically truncated if the message is over
171 1600 bytes, as this is the limit of the protocol.
172
173 One useful trick is to cat the message through
174 .BR smbclient .
175 For example:
176
177 cat mymessage.txt | smbclient -M FRED
178
179 will send the message in the file "mymessage.txt" to the machine FRED.
180
181 You may also find the
182 .B \-U
183 and
184 .B \-I
185 options useful, as they allow you to
186 control the FROM and TO parts of the message. 
187
188 See the message command section of
189 .BR smb.conf (5)
190 for a description of how to handle incoming WinPopup messages in Samba.
191
192 Note: Copy WinPopup into the startup group on your WfWg PCs if you
193 want them to always be able to receive messages.
194 .RE
195
196 .B \-E
197
198 .RS 3
199 This parameter, if specified, causes the client to write messages to the
200 standard error stream (stderr) rather than to the standard output stream.
201
202 By default, the client writes messages to standard output - typically the
203 user's tty.
204 .RE
205
206 .B \-I
207 .I IP number
208
209 .RS 3
210 .I IP number
211 represents the IP number of the server to connect to. It should
212 be specified in standard "a.b.c.d" notation.
213
214 Normally the client will attempt to locate the specified Lan Manager server
215 by looking it up - that is, broadcasting a request for the given server to
216 identify itself. Using this parameter will force the client to assume that
217 the server is on the machine with the specified IP number.
218
219 There is no default for this parameter. If not supplied, it will be determined
220 automatically by the client as described above.
221 .RE
222
223 .B \-N
224
225 .RS 3
226 If specified, this parameter suppresses the normal password prompt from the
227 client to the user. This is useful when accessing a service that does not
228 require a password.
229
230 Unless a password is specified on the command line or this parameter is
231 specified, the client will request a password.
232 .RE
233
234 .B \-O
235 .I socket options
236
237 .RS 3
238 See the socket options section of
239 .BR smb.conf (5)
240 for details.
241 .RE
242
243 .B \-P
244
245 .RS 3
246 If specified, the service requested will be connected to as a printer service
247 rather than as a normal filespace service. Operations such as put and get
248 will not be applicable for such a connection.
249
250 By default, services will be connected to as NON-printer services.
251 .RE
252
253 .B \-U
254 .I username
255
256 .RS 3
257 .I username
258 is the user name that will be used by the client to make a connection,
259 assuming your server is running a protocol that allows for usernames.
260
261 Some servers are fussy about the case of this name, and some insist
262 that it must be a valid netbios name.
263
264 If no 
265 .I username
266 is supplied, it will default to an uppercase version of the 
267 environment variable 
268 .B USER
269 or
270 .B LOGNAME
271 in that order.
272 If no 
273 .I username
274 is supplied and neither environment variable exists the user name will
275 be empty.
276
277 If the USER environment variable containts a '%' character, everything
278 after that will be treated as a password. This allows you to set the
279 environment variable to be
280 .B USER=username%password
281 so that a password is not passed on the command line (where it may
282 be seen by the ps command).
283
284 If the service you are connecting to requires a password, it can be supplied
285 using the
286 .B \-U
287 option, by appending a percent symbol ("%") then the password to 
288 .I username.
289 For example, to attach to a service as user "fred" with password "secret", you
290 would specify
291 .B \-U
292 .I fred%secret
293 on the command line. Note that there are no spaces around the percent symbol.
294
295 If you specify the password as part of
296 .I username
297 then the 
298 .B \-N
299 option (suppress password prompt) is assumed.
300
301 If you specify the password as a parameter AND as part of
302 .I username
303 then the password as part of
304 .I username
305 will take precedence. Putting nothing before or nothing after the percent 
306 symbol will cause an empty username or an empty password to be used,
307 respectively.
308
309 Note: Some servers (including OS/2 and Windows for Workgroups) insist
310 on an uppercase password. Lowercase or mixed case passwords may be
311 rejected by these servers.
312
313 Be cautious about including passwords in scripts.
314 .RE
315
316 .B \-d
317 .I debuglevel
318
319 .RS 3
320 debuglevel is an integer from 0 to 5.
321
322 The default value if this parameter is not specified is zero.
323
324 The higher this value, the more detail will be logged to the log files about
325 the activities of the client. At level 0, only critical errors and serious 
326 warnings will be logged. Level 1 is a reasonable level for day to day running
327 - it generates a small amount of information about operations carried out.
328
329 Levels above 1 will generate considerable amounts of log data, and should 
330 only be used when investigating a problem. Levels above 3 are designed for 
331 use only by developers and generate HUGE amounts of log data, most of which 
332 is extremely cryptic.
333 .RE
334
335 .B \-l
336 .I log basename
337
338 .RS 3
339 If specified,
340 .I log basename
341 specifies a base filename into which operational data from the running client
342 will be logged.
343
344 The default base name is specified at compile time.
345
346 The base name is used to generate actual log file names. For example, if the
347 name specified was "log", the following files would be used for log data:
348
349 .RS 3
350 log.client.debug (containing debugging information)
351
352 log.client.in (containing inbound transaction data)
353
354 log.client.out (containing outbound transaction data)
355 .RE
356
357 The log files generated are never removed by the client.
358 .RE
359
360 .B \-n
361 .I netbios name
362
363 .RS 3
364 By default, the client will use the local machine's hostname (in
365 uppercase) as its netbios name. This parameter allows you to override
366 the host name and use whatever netbios name you wish.
367 .RE
368
369 .B \-W
370 .I workgroup
371
372 .RS 3
373 Override what workgroup is used for the connection. This may be needed
374 to connect to some servers.
375 .RE
376
377 .B \-p
378 .I port number
379
380 .RS 3
381 port number is a positive integer value.
382
383 The default value if this parameter is not specified is 139.
384
385 This number is the port number that will be used when making connections to
386 the server. The standard (well-known) port number for the server is 139, 
387 hence the default.
388
389 This parameter is not normally specified.
390 .RE
391
392 .B \-T
393 .I tar options
394
395 .RS 3 
396 where
397 .I tar options
398 consists of one or more of
399 .BR c ,
400 .BR x ,
401 .BR I ,
402 .BR X ,
403 .BR b ,
404 .BR g ,
405 .BR q ,
406 .BR N
407 or
408 .BR a ;
409 used as:
410 .LP
411 smbclient 
412 .B "\e\eserver\eshare"
413 \-TcxIXbgNa
414 [
415 .IR blocksize
416 ]
417 [
418 .IR newer-file
419 ]
420 .IR tarfile
421 [
422 .IR filenames ...
423 ]
424
425 .RS 3
426 .B c
427 Create a tar file on UNIX. Must be followed by the name of a tar file,
428 tape device or "\-" for standard output. (May be useful to set debugging
429 low
430 .RB ( -d0 ))
431 to avoid corrupting your tar file if using "\-"). Mutually
432 exclusive with the
433 .B x
434 flag.
435
436 .B x
437 Extract (restore) a local tar file back to a share. Unless the
438 .B \-D
439 option is given, the tar files will be restored from the top level of
440 the share. Must be followed by the name of the tar file, device or "\-"
441 for standard input. Mutually exclusive with the
442 .B c
443 flag. Restored files have theuir creation times (mtime) set to the date saved in
444 the tar file. Directories currently do not get their creation dates restored 
445 properly.
446
447 .B I
448 Include files and directories. Is the default behaviour when
449 .IR filenames
450 are specified above. Causes tar files to be included in an extract or create
451 (and therefore everything else to be excluded). See example below.
452 Filename globbing does not work for included files for extractions (yet).
453
454 .B X
455 Exclude files and directories. Causes tar files to be excluded from
456 an extract or create. See example below.
457 Filename globbing does not work for excluded files (yet).
458
459 .B b
460 Blocksize. Must be followed by a valid (greater than zero) blocksize.
461 Causes tar file to be written out in blocksize*TBLOCK (usually 512 byte)
462 blocks.
463
464 .B g
465 Incremental. Only back up files that have the archive bit set. Useful
466 only with the
467 .B c
468 flag.
469
470 .B q
471 Quiet. Keeps tar from printing diagnostics as it works.  This is the
472 same as tarmode quiet.
473
474 .B N
475 Newer than. Must be followed by the name of a file whose date is
476 compared against files found on the share during a create. Only files
477 newer than the file specified are backed up to the tar file. Useful
478 only with the
479 .B c
480 flag.
481
482 .B a
483 Set archive bit. Causes the archive bit to be reset when a file is backed
484 up. Useful with the
485 .B g
486 (and
487 .BR c )
488 flags.
489 .LP
490
491 .B Long File Names
492
493 smbclient's tar option now supports long file names both on backup and 
494 restore. However, the full path name of the file must be less than 1024 bytes.
495 Also, when a tar archive is created, smbclient's tar option places all files 
496 in the archive with relative names, not absolute names.
497
498 .B Filenames ...
499
500 All file names can be given as DOS path names (with \e as the component 
501 separator) or as UNIX path names (with / as the component separator).
502
503 .B Examples
504
505 smbclient \e\emypc\emyshare "" -N -Tx backup.tar
506
507 Restore from tar file backup.tar into myshare on mypc (no password on share).
508
509 smbclient \e\emypc\emyshare "" -N -TXx backup.tar users/docs
510
511 Restore everything except users/docs
512
513 smbclient \e\emypc\emyshare "" -N -Tc backup.tar users/docs
514
515 Create a tar file of the files beneath users/docs.
516
517 smbclient \e\emypc\emyshare "" -N -tc backup.tar users\edocs
518
519 Create the same tar file as above, but now use a DOS path name.
520
521 smbclient \e\emypc\emyshare "" -N -Tc backup.tar \e*
522
523 Create a tar file of all the files and directories in the share.
524 .RE
525 .RE
526
527 .B \-D
528 .I initial directory
529
530 .RS 3 
531 Change to initial directory before starting. Probably only of any use
532 with the tar
533 .RB ( \-T )
534 option.
535 .RE
536
537 .B \-c
538 .I command string
539
540 .RS 3
541 command string is a semicolon separated list of commands to be
542 executed instead of prompting from stdin.
543 .B \-N
544 is implied by
545 .BR \-c .
546
547 This is particularly useful in scripts and for printing stdin to
548 the server, e.g. \-c 'print \-'.
549 .RE
550 .SH OPERATIONS
551 Once the client is running, the user is presented with a prompt, "smb: \e>".
552 The backslash ("\e") indicates the current working directory on the server,
553 and will change if the current working directory is changed.
554
555 The prompt indicates that the client is ready and waiting to carry out a user
556 command. Each command is a single word, optionally followed by parameters
557 specific to that command. Command and parameters are space-delimited unless
558 these notes specifically state otherwise. All commands are case-insensitive.
559 Parameters to commands may or may not be case sensitive, depending on the
560 command.
561
562 You can specify file names which have spaces in them by quoting the
563 name with double quotes, for example "a long file name".
564
565 Parameters shown in square brackets (eg., "[parameter]") are optional. If not
566 given, the command will use suitable defaults. Parameters shown in angle
567 brackets (eg., "<parameter>") are required.
568
569 Note that all commands operating on the server are actually performed by
570 issuing a request to the server. Thus the behaviour may vary from server to
571 server, depending on how the server was implemented.
572
573 The commands available are given here in alphabetical order.
574
575 .B ?
576 .RS 3
577 .B Parameters:
578 .RS 3
579 .I [command]
580
581 .RE
582 .B Description:
583 .RS 3
584 If
585 .I command
586 is specified, the
587 .B ?
588 command will display a brief informative message about the specified command.
589
590 If no command is specified, a list of available commands will be displayed.
591 .RE
592 .RE
593
594 .B !
595 .RS 3
596 .B Parameters:
597 .RS 3
598 .I [shell command]
599
600 .RE
601 .B Description:
602 .RS 3
603 If
604 .I shell command
605 is specified, the
606 .B !
607 command will execute a shell locally and run the specified shell command. If
608 no command is specified, a shell will be run.
609 .RE
610 .RE
611
612 .B cd
613 .RS 3
614 .B Parameters:
615 .RS 3
616 .I [directory name]
617
618 .RE
619 .B Description:
620 .RS 3
621 If
622 .I directory name
623 is specified, the current working directory
624 .B on the server
625 will be changed to the directory specified. This operation will fail if for
626 any reason the specified directory is inaccessible.
627
628 If no directory name is specified, the current working directory
629 .B on the server
630 will be reported.
631 .RE
632 .RE
633
634 .B del
635 .RS 3
636 .B Parameters:
637 .RS 3
638 .I <mask>
639
640 .RE
641 .B Description:
642 .RS 3
643 The client will request that the server attempt to delete all files matching
644 .I mask
645 from the current working directory
646 .B on the server.
647 .RE
648 .RE
649
650 .B dir
651 .RS 3
652 .B Parameters:
653 .RS 3
654 .I <mask>
655
656 .RE
657 .B Description:
658 .RS 3
659 A list of the files matching
660 .I mask
661 in the current working directory
662 .B on the server
663 will be retrieved from the server and displayed.
664 .RE
665 .RE
666
667 .B exit
668 .RS 3
669 .B Parameters:
670 .RS 3
671 None.
672
673 .RE
674 .B Description:
675 .RS 3
676 Terminate the connection with the server and exit from the program.
677 .RE
678 .RE
679
680 .B get
681 .RS 3
682 .B Parameters:
683 .RS 3
684 .I <remote file name> [local file name]
685
686 .RE
687 .B Description:
688 .RS 3
689 Copy the file called
690 .I remote file name
691 from the server to the machine running the client. If specified, name the
692 local copy
693 .I local file name.
694 Note that all transfers in
695 .B smbclient
696 are binary. See also the
697 .B lowercase
698 command.
699 .RE
700 .RE
701
702 .B help
703 .RS 3
704 .B Parameters:
705 .RS 3
706 .I [command]
707
708 .RE
709 .B Description:
710 .RS 3
711 See the
712 .B ?
713 command above.
714 .RE
715 .RE
716
717 .B lcd
718 .RS 3
719 .B Parameters:
720 .RS 3
721 .I [directory name]
722
723 .RE
724 .B Description:
725 .RS 3
726 If
727 .I directory name
728 is specified, the current working directory
729 .B on the local machine
730 will be changed to the directory specified. This operation will fail if for
731 any reason the specified directory is inaccessible.
732
733 If no directory name is specified, the name of the current working directory
734 .B on the local machine
735 will be reported.
736 .RE
737 .RE
738
739 .B lowercase
740 .RS 3
741 .B Parameters:
742 .RS 3
743 None.
744
745 .RE
746 .B Description:
747 .RS 3
748 Toggle lowercasing of filenames for the
749 .B get
750 and
751 .B mget
752 commands.
753
754 When lowercasing is toggled ON, local filenames are converted to lowercase
755 when using the
756 .B get
757 and
758 .B mget
759 commands. This is often useful when copying (say) MSDOS files from a server,
760 because lowercase filenames are the norm on UNIX systems.
761 .RE
762 .RE
763
764 .B ls
765 .RS 3
766 .B Parameters:
767 .RS 3
768 .I <mask>
769
770 .RE
771 .B Description:
772 .RS 3
773 See the
774 .B dir
775 command above.
776 .RE
777 .RE
778
779 .B mask
780 .RS 3
781 .B Parameters:
782 .RS 3
783 .I <mask>
784
785 .RE
786 .B Description:
787 .RS 3
788 This command allows the user to set up a mask which will be used during
789 recursive operation of the
790 .B mget
791 and
792 .B mput
793 commands.
794
795 The masks specified to the
796 .B mget
797 and
798 .B mput
799 commands act as filters for directories
800 rather than files when recursion is toggled ON.
801
802 The mask specified with the
803 .B mask
804 command is necessary to filter files within those directories. For example,
805 if the mask specified in an
806 .B mget
807 command is "source*"
808 .I and
809 the mask specified with the
810 .B mask
811 command is "*.c"
812 .I and
813 recursion is toggled ON, the
814 .B mget
815 command will retrieve all files matching "*.c" in all directories below
816 and including all directories matching "source*" in the current working 
817 directory.
818
819 Note that the value for
820 .I mask
821 defaults to blank (equivalent to "*") and remains so until the
822 .B mask
823 command is used to change it. It retains the most recently specified value
824 indefinitely. To avoid unexpected results it would be wise to change the
825 value of
826 .I mask
827 back to "*" after using the
828 .B mget
829 or
830 .B mput
831 commands.
832 .RE
833 .RE
834
835 .B md
836 .RS 3
837 .B Parameters:
838 .RS 3
839 .I <directory name>
840
841 .RE
842 .B Description:
843 .RS 3
844 See the
845 .B mkdir
846 command.
847 .RE
848 .RE
849
850 .B mget
851 .RS 3
852 .B Parameters:
853 .RS 3
854 .I <mask>
855
856 .RE
857 .B Description:
858 .RS 3
859 Copy all files matching
860 .I mask
861 from the server to the machine running the client.
862
863 Note that
864 .I mask
865 is interpreted differently during recursive operation and non-recursive
866 operation - refer to the
867 .B recurse
868 and
869 .B mask
870 commands for more information. Note that all transfers in
871 .B smbclient
872 are binary. See also the
873 .B lowercase
874 command.
875 .RE
876 .RE
877
878 .B mkdir
879 .RS 3
880 .B Parameters:
881 .RS 3
882 .I <directory name>
883
884 .RE
885 .B Description:
886 .RS 3
887 Create a new directory 
888 .B on the server
889 (user access privileges permitting) with the specified name.
890 .RE
891 .RE
892
893 .B mput
894 .RS 3
895 .B Parameters:
896 .RS 3
897 .I <mask>
898
899 .RE
900 .B Description:
901 .RS 3
902 Copy all files matching
903 .I mask
904 in the current working directory
905 .B on the local machine
906 to the current working directory on the server.
907
908 Note that
909 .I mask
910 is interpreted differently during recursive operation and non-recursive
911 operation - refer to the
912 .B recurse
913 and
914 .B mask
915 commands for more information. Note that all transfers in
916 .B smbclient
917 are binary.
918 .RE
919 .RE
920
921 .B print
922 .RS 3
923 .B Parameters:
924 .RS 3
925 .I <file name>
926
927 .RE
928 .B Description:
929 .RS 3
930 Print the specified file
931 .B from the local machine
932 through a printable service on the server.
933
934 See also the
935 .B printmode
936 command.
937 .RE
938 .RE
939
940 .B printmode
941 .RS 3
942 .B Parameters:
943 .RS 3
944 .I <graphics or text>
945
946 .RE
947 .B Description:
948 .RS 3
949 Set the print mode to suit either binary data (such as graphical information)
950 or text. Subsequent
951 .B print
952 commands will use the currently set print mode.
953 .RE
954 .RE
955
956 .B prompt
957 .RS 3
958 .B Parameters:
959 .RS 3
960 None.
961
962 .RE
963 .B Description:
964 .RS 3
965 Toggle prompting for filenames during operation of the
966 .B mget
967 and
968 .B mput
969 commands.
970
971 When toggled ON, the user will be prompted to confirm the transfer of each
972 file during these commands. When toggled OFF, all specified files will be
973 transferred without prompting.
974 .RE
975 .RE
976
977 .B put
978 .RS 3
979 .B Parameters:
980 .RS 3
981 .I <local file name> [remote file name]
982
983 .RE
984 .B Description:
985 .RS 3
986 Copy the file called
987 .I local file name
988 from the machine running the client to the server. If specified, name the
989 remote copy
990 .I remote file name.
991 Note that all transfers in
992 .B smbclient
993 are binary. See also the
994 .B lowercase
995 command.
996 .RE
997 .RE
998
999 .B queue
1000 .RS 3
1001 .B Parameters:
1002 .RS 3
1003 None.
1004
1005 .RE
1006 .B Description:
1007 .RS 3
1008 Displays the print queue, showing the job id, name, size and current status.
1009 .RE
1010 .RE
1011
1012 .B quit
1013 .RS 3
1014 .B Parameters:
1015 .RS 3
1016 None.
1017
1018 .RE
1019 .B Description:
1020 .RS 3
1021 See the
1022 .B exit
1023 command.
1024 .RE
1025 .RE
1026
1027 .B rd
1028 .RS 3
1029 .B Parameters:
1030 .RS 3
1031 .I <directory name>
1032
1033 .RE
1034 .B Description:
1035 .RS 3
1036 See the
1037 .B rmdir
1038 command.
1039 .RE
1040 .RE
1041
1042 .B recurse
1043 .RS 3
1044 .B Parameters:
1045 .RS 3
1046 None.
1047
1048 .RE
1049 .B Description:
1050 .RS 3
1051 Toggle directory recursion for the commands
1052 .B mget
1053 and
1054 .BR mput .
1055
1056 When toggled ON, these commands will process all directories in the source
1057 directory (i.e., the directory they are copying
1058 .IR from )
1059 and will recurse into any that match the mask specified to the command. Only
1060 files that match the mask specified using the
1061 .B mask
1062 command will be retrieved. See also the
1063 .B mask
1064 command.
1065
1066 When recursion is toggled OFF, only files from the current working
1067 directory on the source machine that match the mask specified to the
1068 .B mget
1069 or
1070 .B mput
1071 commands will be copied, and any mask specified using the
1072 .B mask
1073 command will be ignored.
1074 .RE
1075 .RE
1076
1077 .B rm
1078 .RS 3
1079 .B Parameters:
1080 .RS 3
1081 .I <mask>
1082
1083 .RE
1084 .B Description:
1085 .RS 3
1086 Remove all files matching
1087 .I mask
1088 from the current working directory
1089 .B on the server.
1090 .RE
1091 .RE
1092
1093 .B rmdir
1094 .RS 3
1095 .B Parameters:
1096 .RS 3
1097 .I <directory name>
1098
1099 .RE
1100 .B Description:
1101 .RS 3
1102 Remove the specified directory (user access privileges permitting)
1103 .B from the server.
1104 .RE
1105 .RE
1106
1107 .B tar
1108 .RS 3
1109 .B Parameters:
1110 .RS 3
1111 .I <c|x>[IXbgNa]
1112
1113 .RE
1114 .B Description:
1115 .RS 3
1116 Performs a tar operation - see the
1117 .B \-T
1118 command line option above. Behaviour
1119 may be affected by the
1120 .B tarmode
1121 command (see below). Using g (incremental) and N (newer) will affect
1122 tarmode settings. Note that using the "\-" option with tar x may not
1123 work - use the command line option instead.
1124 .RE
1125 .RE
1126
1127 .B blocksize
1128 .RS 3
1129 .B Parameters
1130 .RS 3
1131 .I <blocksize>
1132
1133 .RE
1134 .B Description
1135 .RS 3
1136 Blocksize. Must be followed by a valid (greater than zero) blocksize.
1137 Causes tar file to be written out in blocksize*TBLOCK (usually 512 byte)
1138 blocks.
1139 .RE
1140 .RE
1141
1142 .B tarmode
1143 .RS 3
1144 .B Parameters
1145 .RS 3
1146 .I <full|inc|reset|noreset>
1147
1148 .RE
1149 .B Description
1150 .RS 3
1151 Changes tar's behaviour with regard to archive bits. In full mode,
1152 tar will back up everything regardless of the archive bit setting (this
1153 is the default mode). In incremental mode, tar will only back up files
1154 with the archive bit set. In reset mode, tar will reset the archive bit
1155 on all files it backs up (implies read/write share).
1156 .RE
1157 .RE
1158
1159 .B setmode
1160 .RS 3
1161 .B Parameters
1162 .RS 3
1163 .I <filename> <perm=[+|\-]rsha>
1164
1165 .RE
1166 .B Description
1167 .RS 3
1168 A version of the DOS attrib command to set file permissions. For example,
1169
1170 setmode myfile +r
1171
1172 would make myfile read only.
1173 .RE
1174 .RE
1175 .SH NOTES
1176 Some servers are fussy about the case of supplied usernames, passwords, share
1177 names (aka service names) and machine names. If you fail to connect try
1178 giving all parameters in uppercase.
1179
1180 It is often necessary to use the
1181 .B \-n
1182 option when connecting to some types
1183 of servers. For example OS/2 LanManager insists on a valid netbios name
1184 being used, so you need to supply a valid name that would be known to
1185 the server.
1186
1187 .B smbclient
1188 supports long file names where the server supports the LANMAN2
1189 protocol.
1190 .SH FILES
1191 Not applicable.
1192 .SH ENVIRONMENT VARIABLES
1193 .B USER
1194 .RS 3
1195 The variable USER may contain the username of the person using the client.
1196 This information is used only if the protocol level is high enough to support
1197 session-level passwords.
1198 .RE
1199 .SH INSTALLATION
1200 The location of the client program is a matter for individual system 
1201 administrators. The following are thus suggestions only.
1202
1203 It is recommended that the client software be installed under the
1204 /usr/local/samba
1205 hierarchy, in a directory readable by all, writeable only by root. The client
1206 program itself should be executable by all. The client should NOT be setuid 
1207 or setgid!
1208
1209 The client log files should be put in a directory readable and writable only
1210 by the user.
1211
1212 To test the client, you will need to know the name of a running Lan manager
1213 server. It is possible to run
1214 .B smbd
1215 (see
1216 .BR smbd (8))
1217 as an ordinary user - running that server as a daemon on a
1218 user-accessible port (typically any port number over 1024) would
1219 provide a suitable test server.
1220 .SH VERSION
1221 This man page is (mostly) correct for version 1.9.00 of the Samba suite, plus some
1222 of the recent patches to it. These notes will necessarily lag behind 
1223 development of the client software, so it is possible that your version of 
1224 the client has extensions or parameter semantics that differ from or are not 
1225 covered by this man page. Please notify these to the address below for 
1226 rectification.
1227 .SH SEE ALSO
1228 .BR smbd (8)
1229 .SH DIAGNOSTICS
1230 [This section under construction]
1231
1232 Most diagnostics issued by the client are logged in a specified log file. The
1233 log file name is specified at compile time, but may be overridden on the
1234 command line.
1235
1236 The number and nature of diagnostics available depends on the debug level used
1237 by the client. If you have problems, set the debug level to 3 and peruse the
1238 log files.
1239
1240 Most messages are reasonably self-explanatory. Unfortunately, at time of
1241 creation of this man page the source code is still too fluid to warrant
1242 describing each and every diagnostic. At this stage your best bet is still
1243 to grep the source code and inspect the conditions that gave rise to the 
1244 diagnostics you are seeing.
1245 .SH BUGS
1246 None known.
1247 .SH CREDITS
1248 The original Samba software and related utilities were created by 
1249 Andrew Tridgell (samba-bugs@samba.anu.edu.au). Andrew is also the Keeper
1250 of the Source for this project.
1251
1252 See
1253 .BR smb.conf (5)
1254 for a full list of contributors and details on how to 
1255 submit bug reports, comments etc.