Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Mounting a Windows share/shared folder on FreeBSD/FreeNAS

0.00/5 (No votes)
15 Jan 2011 1  
Mounting a Windows share/shared folder on FreeBSD/FreeNAS
This was driving me up the wall for some time.

One of my clients commissioned me to create a new NAS and move all the contents of the shared folders to the NAS.

All done with the wonderful help of FreeNAS (I suggest you read John Simmons' articles on FreeNAS).

I figured the easiest thing for me to do was to initiate the copy from the FreeNAS console.

A standard mount can be done with:

$ mount_smbfs //[username]@[servername][:port]/[share] /[local mount name and path]


But this was failing and it was obvious that the reason was because of the domain. Didn't cross my mind to RTFM, so man mount_smbfs and lo and behold! An answer!

The correct way of mounting a DOMAIN share from the CLI is to add the -W [Workgroup] switch.

$ mount_smbfs -W [domain name] //[username]@[servername][:port]/[share] /[local mount name and path]


(W not w. *nix is case sensitive)

A working example:

$ mount_smbfs -W mydomain.com //mim@MyServer/SharedFolder /mnt/OldWindowsShare


I was asked for my password and then voila!

The universe was at balance once more :)

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here