Q: How can I allow my users to mount a cifs share without an entry in fstab in OpenSuse 11.4?
I have an answer myself. Until OpenSuse 11.2 I could mount my samba shares by making mount.cifs and umount.cifs setuid root. Today I installed OpenSuse 11.4. Unfortunately mount.cifs isn’t anymore allowed to be setuid due to security concerns. Security is not an issue in my case, so I copied the mount.cifs and umount.cifs from 11.2 to make it work again:
- Download cifs-mount-3.4.2-188.8.131.52.x86_64.rpm from this repository (I use 64 bit):
- Extract the files mount.cifs and umount.cifs from the rpm and copy them to /sbin
- Make them setuid root:
linux-y5qw:~ # chmod u+s /sbin/mount.cifs linux-y5qw:~ # chmod u+s /sbin/umount.cifs
- Mount your cifs shares as a normal user:
martin@linux-y5qw:~> /sbin/mount.cifs //192.168.2.2/data /home/martin/data/ -ousername=martin Password: