RE: mount -t smbfs to be read/write to all users & not only root

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

 



On Wed, 2003-11-19 at 12:42, Ow Mun Heng wrote:
> > -----Original Message-----
> > From: Iain Buchanan [mailto:iain@xxxxxxxxxxxx]
> > Sent: Wednesday, November 19, 2003 10:32 AM
> > 
> I tried setting suid to /usr/bin/smbmnt then putting a line into /etc/fstab 
> //server/Stuff     /tmp/ttt    smbfs   username=xxx,password=xxx,user 0 0
> 
> will work using mount /tmp/ttt but umount /tmp/ttt will come out with
> "error, only root allowed to do so"
> 
> 
> What happens if I want users to be able to mount/umount it manually. sort of
> like how we mount the cdrom or floppy or usb.
> 
> Q: isn't there a way to mount/umount using nautilus or maybe
> linneighbourhood??

don't know about linneighbourhood, but if you want normal users to
mount/umount shares, my preference is autofs - it mounts filesystems
automatically when you first try and use them, and then unmounts them if
they're not used for a certain period of time.  This is much better than
setting smbmnt setuid root.  Its fairly easy to set up:

1. edit /etc/auto.master and uncomment the line
/misc /etc/auto.misc  --timeout=60
(I also change the timeout to 300 or more, and the location to
/mnt/auto, so that it looks like this:
/mnt/auto    /etc/auto.misc   --timeout=300)

2. edit /etc/auto.misc and add the line
ttt  -fstype=smbfs,defaults,uid=iain,gid=niceppl,dmask=770,fmask=660,credentials=/root/.credentials/.powercorp   ://server/Stuff

In place of the credentials file option you would put
'username=xxx,password=xxx'

3. make a new directory /mnt/auto (or whatever you made the location in
step 1)

4. (re)start autofs `/etc/init.d/autofs restart`; and add it to your
services (redhat-config-services)

now if you type `ls /mnt/auto` you will see nothing, but if you type `ls
/mnt/auto/ttt` you will see the mount.

Hope this solution is suitable,
-- 
Iain Buchanan <iain@xxxxxxxxxxxxxxxxxxx>

Living in LA is like not having a date on Saturday night.
		-- Candice Bergen


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux