Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using Gentoo, and on my machine at least mount.cifs is not installed suid root by default. In particular, this means that I can't use the user mount option with CIFS shares. I noticed that mount.nfs has suid set. Is there some reason in particular that this is done for CIFS/samba, or is it just Gentoo being overly cautious?

If it matters, I am using net-fs/samba and not net-fs/mount-cifs.

More Information: It seems that historically it was very insecure, however as far back as 2010 the Samba team themselves were happy to reallow suid root access, so is this still an issue? I've tried adding suid to mount.cifs, and it works but I want to get some more information about this if someone is in the know.

share|improve this question

2 Answers 2

up vote 2 down vote accepted
+100

As it looks for Gentoo's wiki, they seem to be worried about its security:

http://en.gentoo-wiki.com/wiki/Samba#Non-Privileged_Mounting

They show you how to do it manually but also warn you about security risks.

Above that section, at first lines of page they also note the following:

Note: net-fs/mount-cifs, the old mount helper, is no longer needed, as the current stable version of net-fs/samba includes all of its functionality.

So you seem to have both choices but they recommend using samba, it has an USE flag 'client' so you don't have to install everything. (It's been quite long time without using Gentoo)

Hope this helps.

share|improve this answer

I don't know the reasons for Gentoo but in Debian mount.cifs has the suid bit set and it is supported by upstream nowadays. To get the rationale and understand the reasons you should create a bug report at the Gentoo bug tracker - I would contain a link to the commit which enabled suid support again.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.