Having an unpriviledged user mount a windows share: how?

Asked by dierre on 2007-11-01


how can I let my normal users mount a windows share in a subdirectory of their home?

smbmount and a line in fstab wouldn't work because I want to let them free to choose the mountpoint and besides I don't want to expose their windows credentials in fstab.

I tried fusesmb but it seems that it mount the whole "network neighborhood", while I am interested in mounting just a single share.

Does anybody please have a suggestion?


Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Solved by:
Jan-Philipp Litza
Last query:
Last reply:
Revision history for this message
Best Jan-Philipp Litza (jplitza) said :

I don't quite understand your problem. smbmnt (which is called by smbmount) is installed as suid root by default, so users can mount Samba Shares wherever they want without using sudo. I just tested it, and it worked like a charm:

$ cd
$ mkdir mount
$ smbmount //host/Stuff mount
Anonymous login successful
$ ls mount
[filelisting appered here]

Revision history for this message
dierre (fdr) said :

You're right, I had not noticed that smbmnt is installed suid root by default.

I tried your suggestion but it does not work for me, since the share is to be mounted with cifs and smbmount uses smbfs.

But your advice was good, I noticed that mount.cifs is suid root as well, so I managed to make it work. Thank you.

Revision history for this message
dierre (fdr) said :

Thanks Jan-Philipp Litza, that solved my question.