Section A.1. SMB URI Syntax

A.1. SMB URI Syntax

Commands that make use of Samba's libsmbclient library frequently prefer (or require) the SMB URI syntax instead of the UNC path when accessing SMB/CIFS servers. The SMB URI syntax is similar to the URIs used to access resources on the Internet, such as or

The smb:// syntax can be used to enumerate browse lists of workgroups or shares on servers. The following two URI examples enumerate the contents of a workgroup's browse list and a servers collection of shares:


These next two examples connect to a share on a specific server.


These final two examples are used to connect to the same shares as in the previous listing, but include user credentials in the URI string:


More information on the SMB URI syntax can be found in the latest copy of the draft-crhertel-smb-uri Internet draft at

Using Samba
Using Samba: A File and Print Server for Linux, Unix & Mac OS X, 3rd Edition
ISBN: 0596007698
EAN: 2147483647
Year: 2004
Pages: 135 © 2008-2017.
If you may any questions please contact us: