DEV Community

pineapplemeat
pineapplemeat

Posted on

Connect to SMB share on Mac with specific username (with or without password)

Specify username and password

smb://user:password@server_host
Enter fullscreen mode Exit fullscreen mode

Specify username and be prompted for password

smb://user:*@server_host
Enter fullscreen mode Exit fullscreen mode

Further Reading

(last updated 2012-09-23)

Resource Identifier (RI) Scheme name: smb 
Status: provisional

Scheme syntax:
   smb://[<user>@]<host>[:<port>][/[<path>]][?<param1>=<value1>[;<param2>=<value2>]] or 
   smb://[<user>@]<workgroup>[:<port>][/] or s
   mb://[[<domain>;]<username>[:<password>]@]<server>[:<port>][/[<share>[/[<path>]]][?[<param>=<value>[<param2>=<value2>[...]]]]]     
   example: smb://workgroup;user:password@server/share/folder/file.txt

Scheme semantics:
   Accessing SMB/CIFS shares

Encoding considerations:
   Unknown, use with care.

Applications/protocols that use this scheme name:

Interoperability considerations:
   Unknown, use with care.
   May be unsuitable for open use on the public internet.
Security considerations:
   Unknown, use with care.
Contact:
   Registering party: Dave Thaler <dthaler&microsoft.com>
   Scheme creator: IETF Draft
Author/Change controller:
   Either the registering party or someone who is verified to represent
   the scheme creator.  See previous answer.
References:
   http://en.wikipedia.org/wiki/Server_Message_Block, http://www.jarvana.com/jarvana/view/org/samba/jcifs/jcifs/1.2.19/jcifs-1.2.19-javadoc.jar!/jcifs/smb/SmbFile.html, http://tools.ietf.org/html/draft-crhertel-smb-url  


(file created 2012-09-23)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)