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:
IT Security web site: http://www.its.qut.edu.au/itsecurity/
CRICOS No. 00213J
--
Bookmark/Search this post with:
Mount CIFS share as user
On (01/03/07 10:26), Greg Vickers wrote:
> 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
Here's what I do:
set up .smb_pass in each user's home dir
cat .smb_pass
username=
password=
use the cifs module (I usually use modconf but $ sudo modprobe -i cifs
should do it).
and put the following in /etc/fstab (having created the mount point):
//server/sharename /mountpoint credentials=/home/cma/.smb_pass,uid=,gid=,file_mode=0660,dir_mode=0770 0 0
Regards
Clive
--
www.clivemenzies.co.uk ...
...strategies for business
--