Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Okay, I'm familiar with the basics, use sudo mount_smbfs smb://domain;user:password@server/sharename /mountpoint ... but this doesn't work, thought I had it working and now it's not again...

Opps... Remembered

Okay, I figured out what I was doing wrong while I was typing this post, but for the sake of the past 2 hours that I've spent figuring this out I'll go ahead and try to list out what I've learned

First of all, make sure that you don't have the Shared folder already mounted somewhere or you'll get the dreaded mount error: file exists. The df command may help here. Heads up to Mark for his post that helped me figure that one out, will link to that post at the end.

Another error that you're likely to run into is "could not find mount point: no such file or folder", just make a folder that is the same as /mountpoint that you're trying to mount your shared folder to. mkdir $HOME/the rest of your path/yourmountpointname or mkdir /yourmountpointname will fix that. $HOME is a variable that expands to /Users/ComputerName which is different for every system.

Finally, the problem that killed me was Apple's insanity or whoever programmed this command, sudo, su, and even the straight command will fail with the error "server rejected the connection: Authentication error" which is very misleading and probably has nothing to do with the real error. I finally figured out what I was doing wrong when I read Ward's post on how to use this command, linked at the end of this post. Basically you have to use "sudo -u UserNamewithAdminRights Command" in order for it to work. The following is an example of what it should look like.

Note that this is two separate commands, the lower command is all one line

mkdir /mountpoint

sudo -u UserName mount_smbfs smb://networkuser:networkpassword@servername/sharename /mountpoint

One other thing you may have problems with is the password, it's very fussy... you can just leave it out of the command line and it will prompt you for it. Leave the ":networkpassword" part out if you're having issues, beyond that the above example should be fairly foolproof.

If you're interested in using this seriously, you may want to research autofs some, or at least that's the direction I'm heading with it. Correction, I'm looking to replace this with autofs not use it with autofs.

Link to Mark's post: http://www.markhneedham.com/blog/2011/01/15/mount_smbfs-mount-error-file-exists/

Link to Ward's post: http://www.oakgrounds.com/blogbriask-the-experti/item/183-smb-mount-mount-t-smbfs-on-a-mac-osx-headache

share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.