smbclient (1)

Samba

23 Oct 1998


NAME

smbclient - ftp-like client to access SMB/CIFS resources on servers


SYNOPSIS


smbclient servicename [password] [-s smb.conf] [-B IP addr] [-O socket options][-R name resolve order] [-M NetBIOS name] [-i scope] [-N] [-n NetBIOS name] [-d debuglevel] [-P] [-p port] [-l log basename] [-h] [-I dest IP] [-E] [-U username] [-L NetBIOS name] [-t terminal code] [-m max protocol] [-W workgroup] [-T<c|x>IXFqgbNan] [-D directory] [-c command string]


DESCRIPTION


This program is part of the Samba suite.


smbclient is a client that can 'talk' to an SMB/CIFS server. It offers an interface similar to that of the ftp program (see ftp (1)). Operations include things like getting files from the server to the local machine, putting files from the local machine to the server, retrieving directory information from the server and so on.


OPTIONS



OPERATIONS


Once the client is running, the user is presented with a prompt :


smb:\>


The backslash ("\") indicates the current working directory on the server, and will change if the current working directory is changed.


The prompt indicates that the client is ready and waiting to carry out a user command. Each command is a single word, optionally followed by parameters specific to that command. Command and parameters are space-delimited unless these notes specifically state otherwise. All commands are case-insensitive. Parameters to commands may or may not be case sensitive, depending on the command.


You can specify file names which have spaces in them by quoting the name with double quotes, for example "a long file name".


Parameters shown in square brackets (e.g., "[parameter]") are optional. If not given, the command will use suitable defaults. Parameters shown in angle brackets (e.g., "<parameter>") are required.


Note that all commands operating on the server are actually performed by issuing a request to the server. Thus the behavior may vary from server to server, depending on how the server was implemented.


The commands available are given here in alphabetical order.



NOTES


Some servers are fussy about the case of supplied usernames, passwords, share names (AKA service names) and machine names. If you fail to connect try giving all parameters in uppercase.


It is often necessary to use the -n option when connecting to some types of servers. For example OS/2 LanManager insists on a valid NetBIOS name being used, so you need to supply a valid name that would be known to the server.


smbclient supports long file names where the server supports the LANMAN2 protocol or above.


ENVIRONMENT VARIABLES


The variable USER may contain the username of the person using the client. This information is used only if the protocol level is high enough to support session-level passwords.


The variable PASSWORD may contain the password of the person using the client. This information is used only if the protocol level is high enough to support session-level passwords.


INSTALLATION


The location of the client program is a matter for individual system administrators. The following are thus suggestions only.


It is recommended that the smbclient software be installed in the /usr/local/samba/bin or /usr/samba/bin directory, this directory readable by all, writeable only by root. The client program itself should be executable by all. The client should NOT be setuid or setgid!


The client log files should be put in a directory readable and writeable only by the user.


To test the client, you will need to know the name of a running SMB/CIFS server. It is possible to run smbd (8) an ordinary user - running that server as a daemon on a user-accessible port (typically any port number over 1024) would provide a suitable test server.


DIAGNOSTICS


Most diagnostics issued by the client are logged in a specified log file. The log file name is specified at compile time, but may be overridden on the command line.


The number and nature of diagnostics available depends on the debug level used by the client. If you have problems, set the debug level to 3 and peruse the log files.


VERSION


This man page is correct for version 2.0 of the Samba suite.


AUTHOR


The original Samba software and related utilities were created by Andrew Tridgell samba-bugs@samba.org. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


The original Samba man pages were written by Karl Auer. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at ftp://ftp.icce.rug.nl/pub/unix/) and updated for the Samba2.0 release by Jeremy Allison. samba-bugs@samba.org.


See samba (7) to find out how to get a full list of contributors and details on how to submit bug reports, comments etc.