I have many computers I need to connect to from my Linux box. Network browsing works, but is terribly slow, so I want to create some shortcuts, that I can mount with a single mouseclick what I need from a list. First I thought to modify the fstab and put there entries that would allow me to easily mount smb shares as a normal user. E.g.:
//paula/michael /media/smbmounts smbfs noauto,user,credentials=/home/jeltsch/.smbpasswd1 0 0
This works if I have the entry mounted at system startup (without the "noauto" entry). If the "noauto" entry is present, the smb share is not mounted at system startup, but must explicitely be mounted by the following command:
Because of the "user" option in the fstab, every regular user should be able to do this. Not so! First I had to enable the "suid" for the smbmnt command (it appeared to be in /usr/bin/smbmnt, but was linked to a link that linked to /usr/lib/samba/classic/smbmnt:
chmod +s /usr/lib/samba/classic/smbmnt
Then I found contradicting information whether the mountpoint (in my case /media/smbmounts) has to owned by the mounting user or not. To be safe it did:
chown jeltsch /media/smbmounts
Still I got an error which I couldn't figure out and I decided to use automounts.