LIBSMBCLIENT(7) 7 LIBSMBCLIENT(7)NAME
libsmbclient - An extension library for browsers and that can be used as a generic browsing API.
SYNOPSIS
Browser URL: smb://[[[domain:]user[:password@]]server[/share[/path[/file]]]] [?options]
DESCRIPTION
This tool is part of the samba(7) suite.
libsmbclient is a library toolset that permits applications to manipulate CIFS/SMB network resources using many of the standards POSIX
functions available for manipulating local UNIX/Linux files. It permits much more than just browsing, files can be opened and read or
written, permissions changed, file times modified, attributes and ACL's can be manipulated, and so on. Of course, its functionality
includes all the capabilities commonly called browsing.
libsmbclient can not be used directly from the command line, instead it provides an extension of the capabilities of tools such as file
managers and browsers. This man page describes the configuration options for this tool so that the user may obtain greatest utility of use.
OPTIONS
What the URLs mean:
smb://
Shows all workgroups or domains that are visible in the network. The behavior matches that of the Microsoft Windows Explorer.
The method of locating the list of workgroups (domains also) varies depending on the setting of the context variable
(context->options.browse_max_lmb_count). It is the responsibility of the application that calls this library to set this to a sensible
value. This is a compile-time option. This value determines the maximum number of local master browsers to query for the list of
workgroups. In order to ensure that the list is complete for those present on the network, all master browsers must be querried. If
there are a large number of workgroups on the network, the time spent querying will be significant. For small networks (just a few
workgroups), it is suggested to set this value to 0, instructing libsmbclient to query all local master browsers. In an environment
that has many workgroups a more reasonable setting may be around 3.
smb://name/
This command causes libsmbclient to perform a name look-up. If the NAME<1D> or NAME<1B> exists (workgroup name), libsmbclient will list
all servers in the workgroup (or domain). Otherwise, a name look-up for the NAME<20> (machine name) will be performed, and the list of
shared resources on the server will be displayed.
When libsmbclient is invoked by an application it searches for a directory called .smb in the $HOME directory that is specified in the
users shell environment. It then searches for a file called smb.conf which, if present, will fully over-ride the system /etc/samba/smb.conf
file. If instead libsmbclient finds a file called ~/.smb/smb.conf.append, it will read the system /etc/samba/smb.conf and then append the
contents of the ~/.smb/smb.conf.append to it.
libsmbclient will check the users shell environment for the USER parameter and will use its value when if the user parameter was not
included in the URL.
PROGRAMMERS GUIDE
Watch this space for future updates.
VERSION
This man page is correct for version 3 of the Samba suite.
AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open
Source project similar to the way the Linux kernel is developed.
The libsmbclient manpage page was written by John H Terpstra.
Samba 3.5 06/18/2010 LIBSMBCLIENT(7)
Check Out this Related Man Page
SMBGET(1) User Commands SMBGET(1)NAME
smbget - wget-like utility for download files over SMB
SYNOPSIS
smbget [-a, --guest] [-r, --resume] [-R, --recursive] [-u, --username=STRING] [-p, --password=STRING] [-w, --workgroup=STRING]
[-n, --nonprompt] [-d, --debuglevel=INT] [-D, --dots] [-P, --keep-permissions] [-o, --outputfile] [-f, --rcfile] [-q, --quiet]
[-v, --verbose] [-b, --blocksize] [-?, --help] [--usage] {smb://host/share/path/to/file} [smb://url2/] [...]
DESCRIPTION
This tool is part of the samba(7) suite.
smbget is a simple utility with wget-like semantics, that can download files from SMB servers. You can specify the files you would like to
download on the command-line.
The files should be in the smb-URL standard, e.g. use smb://host/share/file for the UNC path \\HOST\SHARE\file.
OPTIONS -a, --guest
Work as user guest
-r, --resume
Automatically resume aborted files
-R, --recursive
Recursively download files
-u, --username=STRING
Username to use
-p, --password=STRING
Password to use
-w, --workgroup=STRING
Workgroup to use (optional)
-n, --nonprompt
Don't ask anything (non-interactive)
-d, --debuglevel=INT
Debuglevel to use
-D, --dots
Show dots as progress indication
-P, --keep-permissions
Set same permissions on local file as are set on remote file.
-o, --outputfile
Write the file that is being download to the specified file. Can not be used together with -R.
-f, --rcfile
Use specified rcfile. This will be loaded in the order it was specified - e.g. if you specify any options before this one, they might
get overriden by the contents of the rcfile.
-q, --quiet
Be quiet
-v, --verbose
Be verbose
-b, --blocksize
Number of bytes to download in a block. Defaults to 64000.
-?, --help
Show help message
--usage
Display brief usage message
SMB URLS
SMB URL's should be specified in the following format:
smb://[[[domain;]user[:password@]]server[/share[/path[/file]]]]
smb:// means all the workgroups
smb://name/ means, if name is a workgroup, all the servers in this workgroup, or if name is a server, all the shares on this server.
EXAMPLES
# Recursively download 'src' directory
smbget -R smb://rhonwyn/jelmer/src
# Download FreeBSD ISO and enable resuming
smbget -r smb://rhonwyn/isos/FreeBSD5.1.iso
# Recursively download all ISOs
smbget -Rr smb://rhonwyn/isos
# Backup my data on rhonwyn
smbget -Rr smb://rhonwyn/
BUGS
Permission denied is returned in some cases where the cause of the error is unknown (such as an illegally formatted smb:// url or trying to
get a directory without -R turned on).
VERSION
This man page is correct for version 3.0 of the Samba suite.
AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open
Source project similar to the way the Linux kernel is developed.
The smbget manpage was written by Jelmer Vernooij.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+--------------------+----------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+----------------------+
|Availability | SUNWsmbar, SUNWsmbau |
+--------------------+----------------------+
|Interface Stability | External |
+--------------------+----------------------+
NOTES
Source for Samba is available on http://opensolaris.org.
Samba(7) delivers the set of four SMF(5) services as can be seen from the following example:
$ svcs samba wins winbind swat
STATE STIME FMRI
disabled Apr_21 svc:/network/samba:default
disabled Apr_21 svc:/network/winbind:default
disabled Apr_21 svc:/network/wins:default
disabled Apr_21 svc:/network/swat:default
where the services are:
"samba"
runs the smbd daemon managing the CIFS sessions
"wins"
runs the nmbd daemon enabling the browsing (WINS)
"winbind"
runs the winbindd daemon making the domain idmap
"swat"
Samba Web Administration Tool is a service providing access to browser-based Samba administration interface and on-line documentation.
The service runs on software loopback network interface on port 901/tcp, i.e. opening "http://localhost:901/" in browser will access
the SWAT service on local machine.
Please note: SWAT uses HTTP Basic Authentication scheme where user name and passwords are sent over the network in clear text. In the SWAT
case the user name is root. Transferring such sensitive data is advisable only on the software loopback network interface or over secure
networks.
Samba 3.0 01/19/2009 SMBGET(1)