Here’s another tidbit I hope saves folks some cycles. I was having a terrible time figuring out how to properly mount a Samaba share on Ubuntu with either smbfs or cifs. There is a smattering of help on the net for the problem I had:
user@host:~$ sudo mount -t cifs //machine-name/mount-name -o username=me,password=$foo$ /mnt/sbb-cd-images/ mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Most of the advice assumes you have to pass the domain on a system that requires it. So I tried several variations of the following:
user@host:~$ sudo mount -t cifs //machine-name/mount-name -o username=DOMAIN/me,password=$foo$ /mnt/sbb-cd-images/ mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
What I finally discovered was that my password (that contains special charaters like dollar signs, $’s) needed to be quoted.
In my case, both of the following worked (both with and without the domain) so I’m assuming cifs can figure that out on it’s own in certain cases:
user@host:~$ sudo mount -t cifs //machine-name/mount-name -o username=DOMAIN/me,password='$foo$' /mnt/mount-point/ user@host:~$ user@host:~$ sudo mount -t cifs //machine-name/mount-name -o username=me,password='$foo$' /mnt/mount-point/ user@host:~$
Of course the /mnt/mount-point directory needs to exist. Happy mounting!

Posted on March 23, 2012