When I browsed my shared folders on the Lacie Ethernet Disk I noticed that I didn’t have any write access in Ubuntu, even though I explicitly gave read/write access to the NAS users. As I was never asked for a password I was quickly able to conclude that I had to provide username and password in order to gain full access to my shared folders.
So I entered a url like smb://username:password@ip-address/path/ which worked in other situations before, but Nautilus the file browser showed me a new dialog to enter a domain (Windows) and password. No matter what I entered there, it didn’t appear to work. And I’m not sure how to remove this dialog box.
One way to work around this behavior is to mount the Samba/CIFS share on the command line. (CIFS is the Common Internet File System and replaces sambafs.) First I had to make sure that a non-root user has the permissions to mount a file system. I created a new group ‘samba’ and added myself to it.
sudo groupadd samba sudo adduser gerrit samba sudo visudo
And added a new line in the “group” section:
## Members of the admin group may gain root privileges %admin ALL=(ALL) ALL %samba ALL=(ALL) /bin/mount,/bin/umount,/sbin/mount.cifs,/sbin/umount.cifs
All set, now I could create a folder for my Samba share mkdir ~/mnt and mount:
sudo mount -t cifs //ip-address/path ~/mnt -o username=gerrit,password=xxxxxx,noexec
More details can be found in the Ubuntu help on Setting up Samba.