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