LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-07-2008, 10:29 AM   #1
steve_f60
Member
 
Registered: Jul 2004
Posts: 43

Rep: Reputation: 15
Users unable to Mount a CD


Hello All,

I have a need for a user to run a script I wrote that contains a section to mount a cd & then later umount it. Running SuSE10 in runlevel3

The user was unable to mount the drive said must be superuser to mount.

I verified the fstab file was correctly configured :

/dev/cdrom /media/cdrom auto ro,noauto,user 0 0


I was able to make this work by changing the permissions on /bin/mount & /bin/umount with a suid ( chmod +s /bin/mount )

The user was then able to mount the cd.

My question is, the suid basically opens the cd for anybody to be able to mount it. I wanted to limit who had the ability. The last thing I tried was visudo the sudoers file as below:

loadqas ALL=NOPASSWD:/bin/mount /media/cdrom,/bin/umount /media/cdrom

Also tried it as :

loadqas ALL=NOPASSWD:/bin/mount,/bin/umount

Shouldn't that have worked with the sudoers change???

Thanks,

Steve
 
Old 03-07-2008, 12:26 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
The sysadmin should edit /etc/sudoers to specify the user by name, and the command that user is allowed to run as root.

Then edit the script to add 'sudo' to the mount command.

The user then runs the script.

Last edited by bigrigdriver; 03-07-2008 at 12:28 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to validate users against Directory Users in RHEL4 Felipe Red Hat 0 10-27-2006 07:39 AM
Unable to Build ELDK3.1 for kernel 2.4.25. On Booting Unable to mount root fs.. kannath Debian 0 05-11-2006 10:26 AM
Unable to add users to gproftpd Hammett Linux - Software 0 02-11-2005 12:23 PM
Users unable to use shutdown Jskill007 Slackware 3 09-15-2004 03:54 AM
unable to pm users? bigcletus LQ Suggestions & Feedback 3 06-24-2003 11:14 PM


All times are GMT -5. The time now is 04:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration