Mounting a cifs share as normal user in OpenSuse 11.4

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:

  1. Download cifs-mount-3.4.2- from this repository (I use 64 bit):”](
  2. Extract the files mount.cifs and umount.cifs from the rpm and copy them to /sbin
  3. Make them setuid root:
linux-y5qw:~ # chmod u+s /sbin/mount.cifs
linux-y5qw:~ # chmod u+s /sbin/umount.cifs
  1. Mount your cifs shares as a normal user:
martin@linux-y5qw:~> /sbin/mount.cifs // /home/martin/data/ -ousername=martin

if you don’t have root access, user interfaces like GNOME (gvfs) and KDE (kio_slaves) provide VFS interfaces that allow user mounting.

They don’t always work the same as a true mount. KIO slaves uses something like smb:// and not everything knows how to use that.