1SMBCLIENT(1) SMBCLIENT(1)
2
3
4
6 smbclient - ftp-like client to access SMB/CIFS resources on servers
7
9 smbclient [-b <buffer size>] [-d debuglevel] [-L <netbios name>]
10 [-U username] [-I destinationIP] [-M <netbios name>] [-m maxprotocol]
11 [-A authfile] [-N] [-i scope] [-O <socket options>] [-p port]
12 [-R <name resolve order>] [-s <smb config file>] [-k] [-P] [-c <com‐
13 mand>]
14
15 smbclient {servicename} [password] [-b <buffer size>] [-d debuglevel]
16 [-D Directory] [-U username] [-W workgroup] [-M <netbios name>]
17 [-m maxprotocol] [-A authfile] [-N] [-l logdir] [-I destinationIP]
18 [-E] [-c <command string>] [-i scope] [-O <socket options>] [-p port]
19 [-R <name resolve order>] [-s <smb config file>] [-T<c|x>IXFqgbNan]
20 [-k]
21
23 This tool is part of the samba(7) suite.
24
25 smbclient is a client that can 'talk' to an SMB/CIFS server. It offers
26 an interface similar to that of the ftp program (see ftp(1)). Opera‐
27 tions include things like getting files from the server to the local
28 machine, putting files from the local machine to the server, retrieving
29 directory information from the server and so on.
30
32 servicename
33 servicename is the name of the service you want to use on the
34 server. A service name takes the form //server/service where server
35 is the NetBIOS name of the SMB/CIFS server offering the desired ser‐
36 vice and service is the name of the service offered. Thus to connect
37 to the service "printer" on the SMB/CIFS server "smbserver", you
38 would use the servicename //smbserver/printer
39
40 Note that the server name required is NOT necessarily the IP (DNS)
41 host name of the server ! The name required is a NetBIOS server
42 name, which may or may not be the same as the IP hostname of the
43 machine running the server.
44
45 The server name is looked up according to either the -R parameter to
46 smbclient or using the name resolve order parameter in the
47 smb.conf(5) file, allowing an administrator to change the order and
48 methods by which server names are looked up.
49
50 password
51 The password required to access the specified service on the speci‐
52 fied server. If this parameter is supplied, the -N option (suppress
53 password prompt) is assumed.
54
55 There is no default password. If no password is supplied on the com‐
56 mand line (either by using this parameter or adding a password to
57 the -U option (see below)) and the -N option is not specified, the
58 client will prompt for a password, even if the desired service does
59 not require one. (If no password is required, simply press ENTER to
60 provide a null password.)
61
62 Note: Some servers (including OS/2 and Windows for Workgroups)
63 insist on an uppercase password. Lowercase or mixed case passwords
64 may be rejected by these servers.
65
66 Be cautious about including passwords in scripts.
67
68 -R <name resolve order>
69 This option is used by the programs in the Samba suite to determine
70 what naming services and in what order to resolve host names to IP
71 addresses. The option takes a space-separated string of different
72 name resolution options.
73
74 The options are :"lmhosts", "host", "wins" and "bcast". They cause
75 names to be resolved as follows:
76
77 · lmhosts: Lookup an IP address in the Samba lmhosts file. If
78 the line in lmhosts has no name type attached to the NetBIOS
79 name (see the lmhosts(5) for details) then any name type
80 matches for lookup.
81
82 · host: Do a standard host name to IP address resolution, using
83 the system /etc/hosts , NIS, or DNS lookups. This method of
84 name resolution is operating system dependent, for instance on
85 IRIX or Solaris this may be controlled by the /etc/nss‐
86 witch.conf file). Note that this method is only used if the
87 NetBIOS name type being queried is the 0x20 (server) name
88 type, otherwise it is ignored.
89
90 · wins: Query a name with the IP address listed in the wins
91 server parameter. If no WINS server has been specified this
92 method will be ignored.
93
94 · bcast: Do a broadcast on each of the known local interfaces
95 listed in the interfaces parameter. This is the least reliable
96 of the name resolution methods as it depends on the target
97 host being on a locally connected subnet.
98
99 If this parameter is not set then the name resolve order defined
100 in the smb.conf(5) file parameter (name resolve order) will be
101 used.
102
103 The default order is lmhosts, host, wins, bcast and without this
104 parameter or any entry in the name resolve order parameter of the
105 smb.conf(5) file the name resolution methods will be attempted in
106 this order.
107
108 -M NetBIOS name
109 This options allows you to send messages, using the "WinPopup" pro‐
110 tocol, to another computer. Once a connection is established you
111 then type your message, pressing ^D (control-D) to end.
112
113 If the receiving computer is running WinPopup the user will receive
114 the message and probably a beep. If they are not running WinPopup
115 the message will be lost, and no error message will occur.
116
117 The message is also automatically truncated if the message is over
118 1600 bytes, as this is the limit of the protocol.
119
120 One useful trick is to cat the message through smbclient. For exam‐
121 ple:
122
123
124
125
126 cat mymessage.txt | smbclient -M FRED
127
128 will send the message in the file mymessage.txt to the machine FRED.
129
130 You may also find the -U and -I options useful, as they allow you to
131 control the FROM and TO parts of the message.
132
133 See the message command parameter in the smb.conf(5) for a descrip‐
134 tion of how to handle incoming WinPopup messages in Samba.
135
136 Note: Copy WinPopup into the startup group on your WfWg PCs if you
137 want them to always be able to receive messages.
138
139 -p port
140 This number is the TCP port number that will be used when making
141 connections to the server. The standard (well-known) TCP port number
142 for an SMB/CIFS server is 139, which is the default.
143
144 -P
145 Make queries to the external server using the machine account of the
146 local server.
147
148 -h|--help
149 Print a summary of command line options.
150
151 -I IP-address
152 IP address is the address of the server to connect to. It should be
153 specified in standard "a.b.c.d" notation.
154
155 Normally the client would attempt to locate a named SMB/CIFS server
156 by looking it up via the NetBIOS name resolution mechanism described
157 above in the name resolve order parameter above. Using this parame‐
158 ter will force the client to assume that the server is on the
159 machine with the specified IP address and the NetBIOS name component
160 of the resource being connected to will be ignored.
161
162 There is no default for this parameter. If not supplied, it will be
163 determined automatically by the client as described above.
164
165 -E
166 This parameter causes the client to write messages to the standard
167 error stream (stderr) rather than to the standard output stream.
168
169 By default, the client writes messages to standard output - typi‐
170 cally the user's tty.
171
172 -L
173 This option allows you to look at what services are available on a
174 server. You use it as smbclient -L host and a list should appear.
175 The -I option may be useful if your NetBIOS names don't match your
176 TCP/IP DNS host names or if you are trying to reach a host on
177 another network.
178
179 -t terminal code
180 This option tells smbclient how to interpret filenames coming from
181 the remote server. Usually Asian language multibyte UNIX implementa‐
182 tions use different character sets than SMB/CIFS servers (EUC
183 instead of
184 SJIS for example). Setting this parameter will let smbclient con‐
185 vert between the UNIX filenames and the SMB filenames correctly.
186 This option has not been seriously tested and may have some prob‐
187 lems.
188
189 The terminal codes include CWsjis, CWeuc, CWjis7, CWjis8, CWjunet,
190 CWhex, CWcap. This is not a complete list, check the Samba source
191 code for the complete list.
192
193 -b buffersize
194 This option changes the transmit/send buffer size when getting or
195 putting a file from/to the server. The default is 65520 bytes. Set‐
196 ting this value smaller (to 1200 bytes) has been observed to speed
197 up file transfers to and from a Win9x server.
198
199 -V
200 Prints the program version number.
201
202 -s <configuration file>
203 The file specified contains the configuration details required by
204 the server. The information in this file includes server-specific
205 information such as what printcap file to use, as well as descrip‐
206 tions of all the services that the server is to provide. See
207 smb.conf for more information. The default configuration file name
208 is determined at compile time.
209
210 -d|--debuglevel=level
211 level is an integer from 0 to 10. The default value if this parame‐
212 ter is not specified is zero.
213
214 The higher this value, the more detail will be logged to the log
215 files about the activities of the server. At level 0, only critical
216 errors and serious warnings will be logged. Level 1 is a reasonable
217 level for day-to-day running - it generates a small amount of infor‐
218 mation about operations carried out.
219
220 Levels above 1 will generate considerable amounts of log data, and
221 should only be used when investigating a problem. Levels above 3 are
222 designed for use only by developers and generate HUGE amounts of log
223 data, most of which is extremely cryptic.
224
225 Note that specifying this parameter here will override the
226
227 parameter in the smb.conf file.
228
229 -l|--logfile=logdirectory
230 Base directory name for log/debug files. The extension ".progname"
231 will be appended (e.g. log.smbclient, log.smbd, etc...). The log
232 file is never removed by the client.
233
234 -N
235 If specified, this parameter suppresses the normal password prompt
236 from the client to the user. This is useful when accessing a service
237 that does not require a password.
238
239 Unless a password is specified on the command line or this parameter
240 is specified, the client will request a password.
241
242 If a password is specified on the command line and this option is
243 also defined the password on the command line will be silently ing‐
244 nored and no password will be used.
245
246 -k
247 Try to authenticate with kerberos. Only useful in an Active Direc‐
248 tory environment.
249
250 -A|--authentication-file=filename
251 This option allows you to specify a file from which to read the
252 username and password used in the connection. The format of the file
253 is
254
255
256
257
258
259 username = <value>
260 password = <value>
261 domain = <value>
262
263
264
265 Make certain that the permissions on the file restrict access from
266 unwanted users.
267
268 -U|--user=username[%password]
269 Sets the SMB username or username and password.
270
271 If %password is not specified, the user will be prompted. The client
272 will first check the USER environment variable, then the LOGNAME
273 variable and if either exists, the string is uppercased. If these
274 environmental variables are not found, the username GUEST is used.
275
276 A third option is to use a credentials file which contains the
277 plaintext of the username and password. This option is mainly pro‐
278 vided for scripts where the admin does not wish to pass the creden‐
279 tials on the command line or via environment variables. If this
280 method is used, make certain that the permissions on the file
281 restrict access from unwanted users. See the -A for more details.
282
283 Be cautious about including passwords in scripts. Also, on many sys‐
284 tems the command line of a running process may be seen via the ps
285 command. To be safe always allow rpcclient to prompt for a password
286 and type it in directly.
287
288 -n <primary NetBIOS name>
289 This option allows you to override the NetBIOS name that Samba uses
290 for itself. This is identical to setting the
291
292 parameter in the smb.conf file. However, a command line setting will
293 take precedence over settings in smb.conf.
294
295 -i <scope>
296 This specifies a NetBIOS scope that nmblookup will use to communi‐
297 cate with when generating NetBIOS names. For details on the use of
298 NetBIOS scopes, see rfc1001.txt and rfc1002.txt. NetBIOS scopes are
299 very rarely used, only set this parameter if you are the system
300 administrator in charge of all the NetBIOS systems you communicate
301 with.
302
303 -W|--workgroup=domain
304 Set the SMB domain of the username. This overrides the default
305 domain which is the domain defined in smb.conf. If the domain speci‐
306 fied is the same as the servers NetBIOS name, it causes the client
307 to log on using the servers local SAM (as opposed to the Domain
308 SAM).
309
310 -O socket options
311 TCP socket options to set on the client socket. See the socket
312 options parameter in the smb.conf manual page for the list of valid
313 options.
314
315 -T tar options
316 smbclient may be used to create tar(1) compatible backups of all the
317 files on an SMB/CIFS share. The secondary tar flags that can be
318 given to this option are :
319
320 · c - Create a tar file on UNIX. Must be followed by the name of
321 a tar file, tape device or "-" for standard output. If using
322 standard output you must turn the log level to its lowest
323 value -d0 to avoid corrupting your tar file. This flag is
324 mutually exclusive with the x flag.
325
326 · x - Extract (restore) a local tar file back to a share. Unless
327 the -D option is given, the tar files will be restored from
328 the top level of the share. Must be followed by the name of
329 the tar file, device or "-" for standard input. Mutually
330 exclusive with the c flag. Restored files have their creation
331 times (mtime) set to the date saved in the tar file. Directo‐
332 ries currently do not get their creation dates restored prop‐
333 erly.
334
335 · I - Include files and directories. Is the default behavior
336 when filenames are specified above. Causes files to be
337 included in an extract or create (and therefore everything
338 else to be excluded). See example below. Filename globbing
339 works in one of two ways. See r below.
340
341 · X - Exclude files and directories. Causes files to be excluded
342 from an extract or create. See example below. Filename glob‐
343 bing works in one of two ways now. See r below.
344
345 · F - File containing a list of files and directories. The F
346 causes the name following the tarfile to create to be read as
347 a filename that contains a list of files and directories to be
348 included in an extract or create (and therefore everything
349 else to be excluded). See example below. Filename globbing
350 works in one of two ways. See r below.
351
352 · b - Blocksize. Must be followed by a valid (greater than zero)
353 blocksize. Causes tar file to be written out in block‐
354 size*TBLOCK (usually 512 byte) blocks.
355
356 · g - Incremental. Only back up files that have the archive bit
357 set. Useful only with the c flag.
358
359 · q - Quiet. Keeps tar from printing diagnostics as it works.
360 This is the same as tarmode quiet.
361
362 · r - Regular expression include or exclude. Uses regular
363 expression matching for excluding or excluding files if com‐
364 piled with HAVE_REGEX_H. However this mode can be very slow.
365 If not compiled with HAVE_REGEX_H, does a limited wildcard
366 match on '*' and '?'.
367
368 · N - Newer than. Must be followed by the name of a file whose
369 date is compared against files found on the share during a
370 create. Only files newer than the file specified are backed up
371 to the tar file. Useful only with the c flag.
372
373 · a - Set archive bit. Causes the archive bit to be reset when a
374 file is backed up. Useful with the g and c flags.
375
376 Tar Long File Names
377
378 smbclient's tar option now supports long file names both on
379 backup and restore. However, the full path name of the file must
380 be less than 1024 bytes. Also, when a tar archive is created,
381 smbclient's tar option places all files in the archive with rela‐
382 tive names, not absolute names.
383
384 Tar Filenames
385
386 All file names can be given as DOS path names (with '\' as the
387 component separator) or as UNIX path names (with '/' as the com‐
388 ponent separator).
389
390 Examples
391
392 Restore from tar file backup.tar into myshare on mypc (no pass‐
393 word on share).
394
395 smbclient //mypc/yshare "" -N -Tx backup.tar
396
397 Restore everything except users/docs
398
399 smbclient //mypc/myshare "" -N -TXx backup.tar users/docs
400
401 Create a tar file of the files beneath
402 users/docs.
403
404 smbclient //mypc/myshare "" -N -Tc backup.tar users/docs
405
406 Create the same tar file as above, but now use a DOS path name.
407
408 smbclient //mypc/myshare "" -N -tc backup.tar users\edocs
409
410 Create a tar file of the files listed in the file tarlist.
411
412 smbclient //mypc/myshare "" -N -TcF backup.tar tarlist
413
414 Create a tar file of all the files and directories in the share.
415
416 smbclient //mypc/myshare "" -N -Tc backup.tar *
417
418 -D initial directory
419 Change to initial directory before starting. Probably only of any
420 use with the tar -T option.
421
422 -c command string
423 command string is a semicolon-separated list of commands to be exe‐
424 cuted instead of prompting from stdin.
425 -N is implied by -c.
426
427 This is particularly useful in scripts and for printing stdin to the
428 server, e.g. -c 'print -'.
429
431 Once the client is running, the user is presented with a prompt :
432
433 smb:>
434
435 The backslash ("\") indicates the current working directory on the
436 server, and will change if the current working directory is changed.
437
438 The prompt indicates that the client is ready and waiting to carry out
439 a user command. Each command is a single word, optionally followed by
440 parameters specific to that command. Command and parameters are space-
441 delimited unless these notes specifically state otherwise. All commands
442 are case-insensitive. Parameters to commands may or may not be case
443 sensitive, depending on the command.
444
445 You can specify file names which have spaces in them by quoting the
446 name with double quotes, for example "a long file name".
447
448 Parameters shown in square brackets (e.g., "[parameter]") are optional.
449 If not given, the command will use suitable defaults. Parameters shown
450 in angle brackets (e.g., "<parameter>") are required.
451
452 Note that all commands operating on the server are actually performed
453 by issuing a request to the server. Thus the behavior may vary from
454 server to server, depending on how the server was implemented.
455
456 The commands available are given here in alphabetical order.
457
458 ? [command]
459 If command is specified, the ? command will display a brief informa‐
460 tive message about the specified command. If no command is speci‐
461 fied, a list of available commands will be displayed.
462
463 ! [shell command]
464 If shell command is specified, the ! command will execute a shell
465 locally and run the specified shell command. If no command is speci‐
466 fied, a local shell will be run.
467
468 altname file
469 The client will request that the server return the "alternate" name
470 (the 8.3 name) for a file or directory.
471
472 case_sensitive
473 Toggles the setting of the flag in SMB packets that tells the server
474 to treat filenames as case sensitive. Set to OFF by default (tells
475 file server to treat filenames as case insensitive). Only currently
476 affects Samba 3.0.5 and above file servers with the case sensitive
477 parameter set to auto in the smb.conf.
478
479 cancel jobid0 [jobid1] ... [jobidN]
480 The client will request that the server cancel the printjobs identi‐
481 fied by the given numeric print job ids.
482
483 chmod file mode in octal
484 This command depends on the server supporting the CIFS UNIX exten‐
485 sions and will fail if the server does not. The client requests that
486 the server change the UNIX permissions to the given octal mode, in
487 standard UNIX format.
488
489 chown file uid gid
490 This command depends on the server supporting the CIFS UNIX exten‐
491 sions and will fail if the server does not. The client requests that
492 the server change the UNIX user and group ownership to the given
493 decimal values. Note there is currently no way to remotely look up
494 the UNIX uid and gid values for a given name. This may be addressed
495 in future versions of the CIFS UNIX extensions.
496
497 cd [directory name]
498 If "directory name" is specified, the current working directory on
499 the server will be changed to the directory specified. This opera‐
500 tion will fail if for any reason the specified directory is inacces‐
501 sible.
502
503 If no directory name is specified, the current working directory on
504 the server will be reported.
505
506 del <mask>
507 The client will request that the server attempt to delete all files
508 matching mask from the current working directory on the server.
509
510 dir <mask>
511 A list of the files matching mask in the current working directory
512 on the server will be retrieved from the server and displayed.
513
514 exit
515 Terminate the connection with the server and exit from the program.
516
517 get <remote file name> [local file name]
518 Copy the file called remote file name from the server to the machine
519 running the client. If specified, name the local copy local file
520 name. Note that all transfers in smbclient are binary. See also the
521 lowercase command.
522
523 help [command]
524 See the ? command above.
525
526 lcd [directory name]
527 If directory name is specified, the current working directory on the
528 local machine will be changed to the directory specified. This oper‐
529 ation will fail if for any reason the specified directory is inac‐
530 cessible.
531
532 If no directory name is specified, the name of the current working
533 directory on the local machine will be reported.
534
535 link target linkname
536 This command depends on the server supporting the CIFS UNIX exten‐
537 sions and will fail if the server does not. The client requests that
538 the server create a hard link between the linkname and target files.
539 The linkname file must not exist.
540
541 lowercase
542 Toggle lowercasing of filenames for the get and mget commands.
543
544 When lowercasing is toggled ON, local filenames are converted to
545 lowercase when using the get and mget commands. This is often useful
546 when copying (say) MSDOS files from a server, because lowercase
547 filenames are the norm on UNIX systems.
548
549 ls <mask>
550 See the dir command above.
551
552 mask <mask>
553 This command allows the user to set up a mask which will be used
554 during recursive operation of the mget and mput commands.
555
556 The masks specified to the mget and mput commands act as filters for
557 directories rather than files when recursion is toggled ON.
558
559 The mask specified with the mask command is necessary to filter
560 files within those directories. For example, if the mask specified
561 in an mget command is "source*" and the mask specified with the mask
562 command is "*.c" and recursion is toggled ON, the mget command will
563 retrieve all files matching "*.c" in all directories below and
564 including all directories matching "source*" in the current working
565 directory.
566
567 Note that the value for mask defaults to blank (equivalent to "*")
568 and remains so until the mask command is used to change it. It
569 retains the most recently specified value indefinitely. To avoid
570 unexpected results it would be wise to change the value of mask back
571 to "*" after using the mget or mput commands.
572
573 md <directory name>
574 See the mkdir command.
575
576 mget <mask>
577 Copy all files matching mask from the server to the machine running
578 the client.
579
580 Note that mask is interpreted differently during recursive operation
581 and non-recursive operation - refer to the recurse and mask commands
582 for more information. Note that all transfers in smbclient are
583 binary. See also the lowercase command.
584
585 mkdir <directory name>
586 Create a new directory on the server (user access privileges permit‐
587 ting) with the specified name.
588
589 mput <mask>
590 Copy all files matching mask in the current working directory on the
591 local machine to the current working directory on the server.
592
593 Note that mask is interpreted differently during recursive operation
594 and non-recursive operation - refer to the recurse and mask commands
595 for more information. Note that all transfers in smbclient are
596 binary.
597
598 print <file name>
599 Print the specified file from the local machine through a printable
600 service on the server.
601
602 prompt
603 Toggle prompting for filenames during operation of the mget and mput
604 commands.
605
606 When toggled ON, the user will be prompted to confirm the transfer
607 of each file during these commands. When toggled OFF, all specified
608 files will be transferred without prompting.
609
610 put <local file name> [remote file name]
611 Copy the file called local file name from the machine running the
612 client to the server. If specified, name the remote copy remote file
613 name. Note that all transfers in smbclient are binary. See also the
614 lowercase command.
615
616 queue
617 Displays the print queue, showing the job id, name, size and current
618 status.
619
620 quit
621 See the exit command.
622
623 rd <directory name>
624 See the rmdir command.
625
626 recurse
627 Toggle directory recursion for the commands mget and mput.
628
629 When toggled ON, these commands will process all directories in the
630 source directory (i.e., the directory they are copying from ) and
631 will recurse into any that match the mask specified to the command.
632 Only files that match the mask specified using the mask command will
633 be retrieved. See also the mask command.
634
635 When recursion is toggled OFF, only files from the current working
636 directory on the source machine that match the mask specified to the
637 mget or mput commands will be copied, and any mask specified using
638 the mask command will be ignored.
639
640 rm <mask>
641 Remove all files matching mask from the current working directory on
642 the server.
643
644 rmdir <directory name>
645 Remove the specified directory (user access privileges permitting)
646 from the server.
647
648 setmode <filename> <perm=[+|-]rsha>
649 A version of the DOS attrib command to set file permissions. For
650 example:
651
652 setmode myfile +r
653
654 would make myfile read only.
655
656 stat file
657 This command depends on the server supporting the CIFS UNIX exten‐
658 sions and will fail if the server does not. The client requests the
659 UNIX basic info level and prints out the same info that the Linux
660 stat command would about the file. This includes the size, blocks
661 used on disk, file type, permissions, inode number, number of links
662 and finally the three timestamps (access, modify and change). If the
663 file is a special file (symlink, character or block device, fifo or
664 socket) then extra information may also be printed.
665
666 symlink target linkname
667 This command depends on the server supporting the CIFS UNIX exten‐
668 sions and will fail if the server does not. The client requests that
669 the server create a symbolic hard link between the target and
670 linkname files. The linkname file must not exist. Note that the
671 server will not create a link to any path that lies outside the cur‐
672 rently connected share. This is enforced by the Samba server.
673
674 tar <c|x>[IXbgNa]
675 Performs a tar operation - see the -T command line option above.
676 Behavior may be affected by the tarmode command (see below). Using g
677 (incremental) and N (newer) will affect tarmode settings. Note that
678 using the "-" option with tar x may not work - use the command line
679 option instead.
680
681 blocksize <blocksize>
682 Blocksize. Must be followed by a valid (greater than zero) block‐
683 size. Causes tar file to be written out in blocksize*TBLOCK (usually
684 512 byte) blocks.
685
686 tarmode <full|inc|reset|noreset>
687 Changes tar's behavior with regard to archive bits. In full mode,
688 tar will back up everything regardless of the archive bit setting
689 (this is the default mode). In incremental mode, tar will only back
690 up files with the archive bit set. In reset mode, tar will reset the
691 archive bit on all files it backs up (implies read/write share).
692
694 Some servers are fussy about the case of supplied usernames, passwords,
695 share names (AKA service names) and machine names. If you fail to con‐
696 nect try giving all parameters in uppercase.
697
698 It is often necessary to use the -n option when connecting to some
699 types of servers. For example OS/2 LanManager insists on a valid Net‐
700 BIOS name being used, so you need to supply a valid name that would be
701 known to the server.
702
703 smbclient supports long file names where the server supports the LAN‐
704 MAN2 protocol or above.
705
707 The variable USER may contain the username of the person using the
708 client. This information is used only if the protocol level is high
709 enough to support session-level passwords.
710
711 The variable PASSWD may contain the password of the person using the
712 client. This information is used only if the protocol level is high
713 enough to support session-level passwords.
714
715 The variable LIBSMB_PROG may contain the path, executed with system(),
716 which the client should connect to instead of connecting to a server.
717 This functionality is primarily intended as a development aid, and
718 works best when using a LMHOSTS file
719
721 The location of the client program is a matter for individual system
722 administrators. The following are thus suggestions only.
723
724 It is recommended that the smbclient software be installed in the
725 /usr/local/samba/bin/ or
726 /usr/samba/bin/ directory, this directory readable by all, writeable
727 only by root. The client program itself should be executable by all.
728 The client should NOT be setuid or setgid!
729
730 The client log files should be put in a directory readable and write‐
731 able only by the user.
732
733 To test the client, you will need to know the name of a running
734 SMB/CIFS server. It is possible to run smbd(8) as an ordinary user -
735 running that server as a daemon on a user-accessible port (typically
736 any port number over 1024) would provide a suitable test server.
737
739 Most diagnostics issued by the client are logged in a specified log
740 file. The log file name is specified at compile time, but may be over‐
741 ridden on the command line.
742
743 The number and nature of diagnostics available depends on the debug
744 level used by the client. If you have problems, set the debug level to
745 3 and peruse the log files.
746
748 This man page is correct for version 3 of the Samba suite.
749
751 The original Samba software and related utilities were created by
752 Andrew Tridgell. Samba is now developed by the Samba Team as an Open
753 Source project similar to the way the Linux kernel is developed.
754
755 The original Samba man pages were written by Karl Auer. The man page
756 sources were converted to YODL format (another excellent piece of Open
757 Source software, available at ftp://ftp.icce.rug.nl/pub/unix/) and
758 updated for the Samba 2.0 release by Jeremy Allison. The conversion to
759 DocBook for Samba 2.2 was done by Gerald Carter. The conversion to Doc‐
760 Book XML 4.2 for Samba 3.0 was done by Alexander Bokovoy.
761
762
763
764
765 SMBCLIENT(1)