LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem in using Cmnd_Alias future of sudoers file (https://www.linuxquestions.org/questions/linux-newbie-8/problem-in-using-cmnd_alias-future-of-sudoers-file-4175502214/)

ali.abry 04-18-2014 02:54 PM

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


evo2 04-18-2014 09:41 PM

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.


All times are GMT -5. The time now is 06:13 AM.