LinuxQuestions.org
Help answer threads with 0 replies.
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-24-2009, 05:11 PM   #1
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Rep: Reputation: 33
sudo(/etc/sudoers) issue


Hi,



I added and antry in /etc/sudoers file. But I can still execute the command.


Code:
## Allows members of the users group to shutdown this system
# %users  localhost=/sbin/shutdown -h now
champ    elephant2=/bin/mount /dev/cdrom     ALL  ------------> this one
Code:
[champ@elephant2 ~]$ sudo /bin/mount /dev/cdrom
[sudo] password for champ: 
Sorry, user champ is not allowed to execute '/bin/mount /dev/cdrom' as root on elephant2.
[champ@elephant2 ~]$

any ideas?

Thanks
 
Old 03-24-2009, 05:14 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Quote:
Code:
# %users  localhost=/sbin/shutdown -h now
champ    elephant2=/bin/mount /dev/cdrom     ALL  ------------> this one
Remove the 'ALL' ?



Your invocation doesn't match the command in sudoers, not that
"mount /dev/cdrom ALL" makes much sense in the first place ...

Last edited by Tinkster; 03-24-2009 at 05:32 PM. Reason: added quote
 
Old 03-24-2009, 05:39 PM   #3
palisetty_suman
Member
 
Registered: Feb 2007
Location: TX, USA
Distribution: fedora
Posts: 191

Rep: Reputation: 33
Thumbs up HI

hi


Quote:
# %users localhost=/sbin/shutdown -h now
champ elephant2=/bin/mount /dev/cdrom ALL
The command you typed is wrong for sudoers file. The ALL should be infront of /bin/mount .i.e.

Quote:
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
champ elephant2=(ALL) /bin/mount /dev/cdrom

All the best.
 
  


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
Help with sudo and sudoers zeeple Linux - Newbie 2 12-06-2008 12:51 PM
Preventing Sudoers from doing sudo su DejaCpp Linux - Security 4 12-22-2007 05:47 AM
Configuring SUDO for users, a.k.a. sudoers Micro420 Linux - Newbie 10 04-22-2006 12:12 AM
Sudo password for users, a.k.a. sudoers Micro420 SUSE / openSUSE 2 04-21-2006 10:23 PM
sudo and sudoers syntax mikemrh9 Linux - Security 7 06-04-2005 08:54 PM


All times are GMT -5. The time now is 01:21 AM.

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