Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-21-2003, 10:56 PM
|
#1
|
Member
Registered: Feb 2002
Location: Canada
Distribution: Fedora / CentOS
Posts: 93
Rep:
|
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)
Last edited by csDraco_; 04-21-2003 at 10:58 PM.
|
|
|
04-21-2003, 11:02 PM
|
#2
|
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,306
Rep:
|
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.
|
|
|
04-22-2003, 12:20 AM
|
#3
|
Member
Registered: Apr 2003
Location: Oxford, MA, USA
Distribution: Slackware
Posts: 89
Rep:
|
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
|
|
|
04-22-2003, 03:47 AM
|
#4
|
LQ Newbie
Registered: Apr 2003
Distribution: Slackware 9
Posts: 24
Rep:
|
the point it's not SUID mount, but add the keyword "user" in /etc/fstab (like the example before)
|
|
|
04-22-2003, 04:22 AM
|
#5
|
LQ Newbie
Registered: Apr 2003
Location: Germany
Posts: 12
Rep:
|
as far as I know, SUID on scripts in linux has no effect because of security reasons...
|
|
|
04-22-2003, 04:52 AM
|
#6
|
Senior Member
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243
Rep:
|
Quote:
Originally posted by hungry tom
as far as I know, SUID on scripts in linux has no effect because of security reasons...
|
Not just Linux. Most Unix systems won't allow you to SUID/SGID a script for this reason. I've seen people work around this by writing a C program that is SUID which calls the script but its not really a good idea!
cheers
Jamie...
|
|
|
04-22-2003, 08:44 AM
|
#7
|
Member
Registered: Feb 2002
Location: Canada
Distribution: Fedora / CentOS
Posts: 93
Original Poster
Rep:
|
Quote:
Originally posted by hungry tom
as far as I know, SUID on scripts in linux has no effect because of security reasons...
|
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 
Last edited by csDraco_; 04-22-2003 at 08:45 AM.
|
|
|
All times are GMT -5. The time now is 11:50 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|