LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 04-18-2014, 02:54 PM   #1
ali.abry
Member
 
Registered: Feb 2013
Posts: 74

Rep: Reputation: Disabled
problem in using Cmnd_Alias future of sudoers file


Hi everyone
i trying to use Cmnd_Alias future of sudoers but i got this error for some of the commands :
Code:
Sorry, user sudotest is not allowed to execute '/sbin/blkid' as root on lp.
some of the commands work like useradd userdell but some of them like passwd not working and gives error . i cant understand why some commands should work and some no ?

here is what i did :
i added this 3 line to sudoers file by visudo and added sudotest user as a member of stest group but i got the bottom error .
Code:
Cmnd_Alias ADMIN_CMDS = /usr/sbin/passwd, /usr/sbin/useradd, /usr/sbin/userdel, /usr/sbin/usermod, /usr/sbin/visudo
Cmnd_Alias STORAGE = /sbin/fdisk, /sbin/blkid
%stest ALL = ADMIN_CMDS, STORAGE

Last edited by ali.abry; 04-18-2014 at 03:01 PM.
 
Old 04-18-2014, 09:41 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

are you sure you specified the correct path? On my machines passwd resides at /usr/bin/passwd, not /usr/sbin/passwd.

Also, are you sure your user is in the stest group?

HTH,

Evo2.
 
  


Reply



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
Fedora /etc/sudoers file and sudoers.d directory davejjj Linux - Newbie 2 10-21-2011 06:19 PM
sudoers Cmnd_Alias usage tmy Linux - Security 9 08-03-2011 06:02 AM
sudoers question about cmnd_alias/list and directories. trey85stang Linux - General 2 12-02-2010 03:59 PM
I deleted /etc/sudoers and creates a new file call sudoers but now it doesnt for visu abefroman Linux - Software 1 11-10-2005 05:03 PM
sudo - problem with cmnd_alias slackware stu Linux - Software 0 10-04-2003 12:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:37 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
Open Source Consulting | Domain Registration