chmod u+s
I wrote a (u)mount script for myself so that I don't have su as root. I set the file permisions using "chmod u+s a.bash."
But when I execute this script: "-rwsr-xr-x 1 root users 53 Apr 21 23:25 a.bash" I still get an error: "mount: only root can do that" I also tried g+s, and get the same error. What am I doing wrong? (I hope I'm making sense .. it's late at night now) |
i was messing with the same crap last week.
i ended up setting the suid bit on mount and umount and still it will only work when i umount specifically what i had set in fstab with umask=000 like my fstab line has /dev/cdrom on /mnt/cdrom, but the users still can't mount /dev/cdrom /mnt /cdrom they can only mount /mnt/cdrom i even made the mount points read-write for all i don't know if everything i did was necessary or not. |
why don't you do like this?
cat /etc/fstab ... /dev/cdrom /cdrom iso9660 noauto,ro,user 0 0 /dev/fd0 /mnt/floppy vfat noauto,user,rw 0 2 /dev/scd0 /cdrecord iso9660 noauto,user,ro 0 0 |
the point it's not SUID mount, but add the keyword "user" in /etc/fstab (like the example before)
|
as far as I know, SUID on scripts in linux has no effect because of security reasons...
|
Quote:
cheers Jamie... |
Quote:
Arrrr ... I wish I knew that sooner :) But it's interesting to know that chmod u+s works on a compiled program, I'll give a.out a try. I'm not really interesten in mounting as much as the general application of chmod u+s progs ... since one neat app at my univ. (they use SunOS 5.8) is a submit command, that lets you submit your projects/assignments ... simply copy them to a dir. owned by your prof. While another app works the other way around and lets you read your marks from the profs dir. "chmo u+s" + C or Java or your_other_fav_programing_lang is an excellent tool for interacting with data in a predefined way. Thank you all for responding :) |
All times are GMT -5. The time now is 10:31 PM. |