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