[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Mount CIFS share as user



Hi all,

I want to mount a Windows share using CIFS and an entry in my fstab like so:
//server/share /media/mnt cifs rw,user,noauto,workgroup=one,username=two

This works only if I set the set user ID for /sbin/mount.cifs:
# ll /sbin/mount.cifs
-rwsr-xr-x  1 root root 16960 Feb  1 07:00 /sbin/mount.cifs

If the set user bit is not set, I get:
$ mount /media/mnt
Password:
mount error 1 = Operation not permitted
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

I have to set this bit manually and there is some process that unsets this bit about every month, that I have not been able to find. I'm sure that process is in place for a good reason.

I have two questions:
1) What is the process that unsets the set user ID bit on /sbin/mount.cifs, and;

2) What is the best method of performing this mount as a user? Should I set up sudo for mount? Is there something I am missing from my fstab entry? Should I be circumventing the no-set-user-ID on /sbin/mount.cifs?

Thanks,
--
Greg Vickers
IT Security Engineer & Project Manager
IT Security, Network Services,
Information Technology Services
Queensland University of Technology
L12, 126 Margaret St, Brisbane

Phone: +61 7 3138 9536
Mobile: 0410 434 734
Fax: +61 7 3138 2921
Email: g.vickers@qut.edu.au
IT Security web site: http://www.its.qut.edu.au/itsecurity/

CRICOS No. 00213J



Reply to: