Reality And A Half

How-To: SMB connection URL from Mac OS X 10.5/10.6/10.7/10.8 to Windows Server 2003/2008

If you are writing applications or scripts which install volumes or printer shares offered by a Windows Server on a Mac OS X Client, this could be the perfect confusion. It made me nearly crazy because with every combination of the two companies‘ systems things work differently. In fact, the SMB URL has to be adapted to each combination.

Below you find a table with each combination’s URL (directly tested in praxis and not taken from some theoretical manual). Examples are below the table.

Syntax Combination Table

Mac OS X Windows Server SMB URL
10.4 2003 smb://[<username>:<password>@]<domain>/<hostname>[:<port>]/<sharename>
10.5 smb://[<username>:<password>@]<domain>/<hostname>[:<port>]/<sharename>
10.6 smb://[<domain>;][<username>:<password>@]<hostname>[:<port>]/<sharename>
10.7 smb://[<domain>;][<username>:<password>@]<hostname>[:<port>]/<sharename>
10.8 smb://[<domain>;][<username>:<password>@]<hostname>[:<port>]/<sharename>
10.4 2008 smb://[<username>:<password>@]<domain>/<hostname>[:<port>]/<sharename>
10.5 smb://[<username>:<password>@]<domain>/<hostname>[:<port>]/<sharename>
10.6 smb://[<username>:<password>@]<domain>/<hostname>[:<port>]/<sharename>
10.7 smb://[<domain>;][<username>:<password>@]<hostname>[:<port>]/<sharename>
10.8 smb://[<domain>;][<username>:<password>@]<hostname>[:<port>]/<sharename>

Values in []-brackets are optional (like the port number); <>-brackets enclose a variable value and have to be replaced with their variable label. Mac OS X 10.8 is not tested, yet. I’ll update the post in a few days when I’ll the possibility to check under Mountain Lion. Update: Mountain Lion settings are tested now and they work.

Examples

smb://mydomain;john.doe:nicepassword@printerhost:139/colorprinter
smb://john.doe:nicepassword@mydomain/printerhost:139/colorprinter
smb://john.doe:nicepassword@printerhost:139/colorprinter (without domain)
smb://john.doe:nicepassword@printerhost/colorprinter (without domain and port number)
smb://printerhost/colorprinter (no domain, user and port number)

[amazon_omakase size=“728×90″ locale=““ ad_logo=“hide“ ad_product_images=“show“ ad_link_target=“new“ ad_price=“all“ ad_border=“hide“ ad_discount=“add“ color_border=“000000″ color_background=“FFFFFF“ color_text=“000000″ color_link=“333333″ color_price=“660000″ color_logo=“FFFFFF“ /]
Die mobile Version verlassen