You are not logged in.

#1 2010-06-04 16:06:17

zawart
Member
Registered: 2009-11-29
Posts: 6

Mount cifs as user

Hi,
I'm trying to mount cifs as normal user using mount.cifs via fstab
Here is my fstab entry:

//server/zawart    /home/zawart/media    cifs    credentials=/etc/conf.d
/zawart.cifs,uid=1000,forceuid,gid=100,rw,perm=0600,noexec,nosuid,user,iocharset=utf8,directio,noauto    0    0

Here is what I get when I type mount ~/media as user zawart with uid 1000.

This mount.cifs program has been built with the ability to run as a setuid root program disabled.

So I read the man 8 mount.cifs and there is a note

'This command may be used only by root, unless installed setuid, in which case the noeexec and nosuid mount flags are enabled.

I set it chmod a+s /sbin/mount.cifs and now it still doesn't mount anything but shows different message:

This mount.cifs program has been built with the ability to run as a setuid root program disabled.
mount.cifs has not been well audited for security holes. Therefore the Samba team does not recommend installing it as a setuid root program.

Mounting it as root works but not as normal user, if you could help please leave a post here smile

Last edited by zawart (2010-06-04 16:13:35)

Offline

#2 2010-06-05 06:34:05

Sin.citadel
Member
Registered: 2008-01-22
Posts: 267

Re: Mount cifs as user

this is a security restriction with mount commands, so that only root can mount volumes. by default mount.cifs does not come with setuid enabled, you can however compile it yourself from sources and enable setuid for it,

Offline

Board footer

Powered by FluxBB