preparing for release of 2.0.0 alpha 11
[Samba.git] / docs / manpages / smbclient.1
blobf4f3bbb944577bc363885b3fb6414c63e259e247
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
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
60 .SH DESCRIPTION
61 This program is part of the Samba suite.
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
86 .RS 10
87 .B "\e\elanman\eprinter"
88 .RE
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.
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
100 .B password
101 .RS 3
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.
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.)
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.
122 Be cautious about including passwords in scripts.
125 .B \-R name resolve order
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.
134 .B \-A
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.
143 .B \-L
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.
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:
154 smbclient -L ftp -I ftp.microsoft.com
156 will list the shares available on Microsoft's public server.
159 .B \-M
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.
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.
170 The message is also automatically truncated if the message is over
171 1600 bytes, as this is the limit of the protocol.
173 One useful trick is to cat the message through
174 .BR smbclient .
175 For example:
177 cat mymessage.txt | smbclient -M FRED
179 will send the message in the file "mymessage.txt" to the machine FRED.
181 You may also find the
182 .B \-U
184 .B \-I
185 options useful, as they allow you to
186 control the FROM and TO parts of the message. 
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.
192 Note: Copy WinPopup into the startup group on your WfWg PCs if you
193 want them to always be able to receive messages.
196 .B \-E
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.
202 By default, the client writes messages to standard output - typically the
203 user's tty.
206 .B \-I
207 .I IP number
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.
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.
219 There is no default for this parameter. If not supplied, it will be determined
220 automatically by the client as described above.
223 .B \-N
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.
230 Unless a password is specified on the command line or this parameter is
231 specified, the client will request a password.
234 .B \-O
235 .I socket options
237 .RS 3
238 See the socket options section of
239 .BR smb.conf (5)
240 for details.
243 .B \-P
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.
250 By default, services will be connected to as NON-printer services.
253 .B \-U
254 .I username
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.
261 Some servers are fussy about the case of this name, and some insist
262 that it must be a valid netbios name.
264 If no 
265 .I username
266 is supplied, it will default to an uppercase version of the 
267 environment variable 
268 .B USER
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.
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).
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.
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.
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.
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.
313 Be cautious about including passwords in scripts.
316 .B \-d
317 .I debuglevel
319 .RS 3
320 debuglevel is an integer from 0 to 5.
322 The default value if this parameter is not specified is zero.
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.
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.
335 .B \-l
336 .I log basename
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.
344 The default base name is specified at compile time.
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:
349 .RS 3
350 log.client.debug (containing debugging information)
352 log.client.in (containing inbound transaction data)
354 log.client.out (containing outbound transaction data)
357 The log files generated are never removed by the client.
360 .B \-n
361 .I netbios name
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.
369 .B \-W
370 .I workgroup
372 .RS 3
373 Override what workgroup is used for the connection. This may be needed
374 to connect to some servers.
377 .B \-p
378 .I port number
380 .RS 3
381 port number is a positive integer value.
383 The default value if this parameter is not specified is 139.
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.
389 This parameter is not normally specified.
392 .B \-T
393 .I tar options
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
408 .BR a ;
409 used as:
411 smbclient 
412 .B "\e\eserver\eshare"
413 \-TcxIXbgNa
415 .IR blocksize
418 .IR newer-file
420 .IR tarfile
422 .IR filenames ...
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
430 .RB ( -d0 ))
431 to avoid corrupting your tar file if using "\-"). Mutually
432 exclusive with the
433 .B x
434 flag.
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.
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).
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).
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.
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.
470 .B q
471 Quiet. Keeps tar from printing diagnostics as it works.  This is the
472 same as tarmode quiet.
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.
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.
491 .B Long File Names
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.
498 .B Filenames ...
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).
503 .B Examples
505 smbclient \e\emypc\emyshare "" -N -Tx backup.tar
507 Restore from tar file backup.tar into myshare on mypc (no password on share).
509 smbclient \e\emypc\emyshare "" -N -TXx backup.tar users/docs
511 Restore everything except users/docs
513 smbclient \e\emypc\emyshare "" -N -Tc backup.tar users/docs
515 Create a tar file of the files beneath users/docs.
517 smbclient \e\emypc\emyshare "" -N -tc backup.tar users\edocs
519 Create the same tar file as above, but now use a DOS path name.
521 smbclient \e\emypc\emyshare "" -N -Tc backup.tar \e*
523 Create a tar file of all the files and directories in the share.
527 .B \-D
528 .I initial directory
530 .RS 3 
531 Change to initial directory before starting. Probably only of any use
532 with the tar
533 .RB ( \-T )
534 option.
537 .B \-c
538 .I command string
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 .
547 This is particularly useful in scripts and for printing stdin to
548 the server, e.g. \-c 'print \-'.
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.
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.
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".
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.
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.
573 The commands available are given here in alphabetical order.
575 .B ?
576 .RS 3
577 .B Parameters:
578 .RS 3
579 .I [command]
582 .B Description:
583 .RS 3
585 .I command
586 is specified, the
587 .B ?
588 command will display a brief informative message about the specified command.
590 If no command is specified, a list of available commands will be displayed.
594 .B !
595 .RS 3
596 .B Parameters:
597 .RS 3
598 .I [shell command]
601 .B Description:
602 .RS 3
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.
612 .B cd
613 .RS 3
614 .B Parameters:
615 .RS 3
616 .I [directory name]
619 .B Description:
620 .RS 3
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.
628 If no directory name is specified, the current working directory
629 .B on the server
630 will be reported.
634 .B del
635 .RS 3
636 .B Parameters:
637 .RS 3
638 .I <mask>
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.
650 .B dir
651 .RS 3
652 .B Parameters:
653 .RS 3
654 .I <mask>
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.
667 .B exit
668 .RS 3
669 .B Parameters:
670 .RS 3
671 None.
674 .B Description:
675 .RS 3
676 Terminate the connection with the server and exit from the program.
680 .B get
681 .RS 3
682 .B Parameters:
683 .RS 3
684 .I <remote file name> [local file name]
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.
702 .B help
703 .RS 3
704 .B Parameters:
705 .RS 3
706 .I [command]
709 .B Description:
710 .RS 3
711 See the
712 .B ?
713 command above.
717 .B lcd
718 .RS 3
719 .B Parameters:
720 .RS 3
721 .I [directory name]
724 .B Description:
725 .RS 3
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.
733 If no directory name is specified, the name of the current working directory
734 .B on the local machine
735 will be reported.
739 .B lowercase
740 .RS 3
741 .B Parameters:
742 .RS 3
743 None.
746 .B Description:
747 .RS 3
748 Toggle lowercasing of filenames for the
749 .B get
751 .B mget
752 commands.
754 When lowercasing is toggled ON, local filenames are converted to lowercase
755 when using the
756 .B get
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.
764 .B ls
765 .RS 3
766 .B Parameters:
767 .RS 3
768 .I <mask>
771 .B Description:
772 .RS 3
773 See the
774 .B dir
775 command above.
779 .B mask
780 .RS 3
781 .B Parameters:
782 .RS 3
783 .I <mask>
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
792 .B mput
793 commands.
795 The masks specified to the
796 .B mget
798 .B mput
799 commands act as filters for directories
800 rather than files when recursion is toggled ON.
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.
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
830 .B mput
831 commands.
835 .B md
836 .RS 3
837 .B Parameters:
838 .RS 3
839 .I <directory name>
842 .B Description:
843 .RS 3
844 See the
845 .B mkdir
846 command.
850 .B mget
851 .RS 3
852 .B Parameters:
853 .RS 3
854 .I <mask>
857 .B Description:
858 .RS 3
859 Copy all files matching
860 .I mask
861 from the server to the machine running the client.
863 Note that
864 .I mask
865 is interpreted differently during recursive operation and non-recursive
866 operation - refer to the
867 .B recurse
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.
878 .B mkdir
879 .RS 3
880 .B Parameters:
881 .RS 3
882 .I <directory name>
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.
893 .B mput
894 .RS 3
895 .B Parameters:
896 .RS 3
897 .I <mask>
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.
908 Note that
909 .I mask
910 is interpreted differently during recursive operation and non-recursive
911 operation - refer to the
912 .B recurse
914 .B mask
915 commands for more information. Note that all transfers in
916 .B smbclient
917 are binary.
921 .B print
922 .RS 3
923 .B Parameters:
924 .RS 3
925 .I <file name>
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.
934 See also the
935 .B printmode
936 command.
940 .B printmode
941 .RS 3
942 .B Parameters:
943 .RS 3
944 .I <graphics or text>
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.
956 .B prompt
957 .RS 3
958 .B Parameters:
959 .RS 3
960 None.
963 .B Description:
964 .RS 3
965 Toggle prompting for filenames during operation of the
966 .B mget
968 .B mput
969 commands.
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.
977 .B put
978 .RS 3
979 .B Parameters:
980 .RS 3
981 .I <local file name> [remote file name]
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.
999 .B queue
1000 .RS 3
1001 .B Parameters:
1002 .RS 3
1003 None.
1006 .B Description:
1007 .RS 3
1008 Displays the print queue, showing the job id, name, size and current status.
1012 .B quit
1013 .RS 3
1014 .B Parameters:
1015 .RS 3
1016 None.
1019 .B Description:
1020 .RS 3
1021 See the
1022 .B exit
1023 command.
1027 .B rd
1028 .RS 3
1029 .B Parameters:
1030 .RS 3
1031 .I <directory name>
1034 .B Description:
1035 .RS 3
1036 See the
1037 .B rmdir
1038 command.
1042 .B recurse
1043 .RS 3
1044 .B Parameters:
1045 .RS 3
1046 None.
1049 .B Description:
1050 .RS 3
1051 Toggle directory recursion for the commands
1052 .B mget
1054 .BR mput .
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.
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
1070 .B mput
1071 commands will be copied, and any mask specified using the
1072 .B mask
1073 command will be ignored.
1077 .B rm
1078 .RS 3
1079 .B Parameters:
1080 .RS 3
1081 .I <mask>
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.
1093 .B rmdir
1094 .RS 3
1095 .B Parameters:
1096 .RS 3
1097 .I <directory name>
1100 .B Description:
1101 .RS 3
1102 Remove the specified directory (user access privileges permitting)
1103 .B from the server.
1107 .B tar
1108 .RS 3
1109 .B Parameters:
1110 .RS 3
1111 .I <c|x>[IXbgNa]
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.
1127 .B blocksize
1128 .RS 3
1129 .B Parameters
1130 .RS 3
1131 .I <blocksize>
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.
1142 .B tarmode
1143 .RS 3
1144 .B Parameters
1145 .RS 3
1146 .I <full|inc|reset|noreset>
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).
1159 .B setmode
1160 .RS 3
1161 .B Parameters
1162 .RS 3
1163 .I <filename> <perm=[+|\-]rsha>
1166 .B Description
1167 .RS 3
1168 A version of the DOS attrib command to set file permissions. For example,
1170 setmode myfile +r
1172 would make myfile read only.
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.
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.
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.
1199 .SH INSTALLATION
1200 The location of the client program is a matter for individual system 
1201 administrators. The following are thus suggestions only.
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!
1209 The client log files should be put in a directory readable and writable only
1210 by the user.
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]
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.
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.
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.
1253 .BR smb.conf (5)
1254 for a full list of contributors and details on how to 
1255 submit bug reports, comments etc.