LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Create two entries for the sudoers configuration file - help! (https://www.linuxquestions.org/questions/linux-newbie-8/create-two-entries-for-the-sudoers-configuration-file-help-651066/)

SheMoves 06-23-2008 10:38 AM

Create two entries for the sudoers configuration file - help!
 
I would like to create two entries for the sudoers configuration file:
(a) One entry that allows a user pat, cindy, and tim to service the printer, unjam it, restart printer daemons on the machine printserver.

Is what I did correct? Because I am unable to access the sudoers configuration file.

The sudoers file allows me to group according to function, so I will assign an alias called PrinterAdmins.

User_Alias PrinterAdmins = pat, cindy, tim, %operator
PrinterAdmins ALL = !/usr/bin/su, !SHELLS

Cmnd_Alias PRINTING = /usr/sbin/lpc, /usr/bin/lprm
Cmnd_Alias REBOOT = /usr/sbin/reboot, /usr/sbin/fastboot
Cmnd_Alias SHELLS = /usr/bin/sh, /usr/bin/csh, \
/usr/bin/ksh, /usr/local/bin/tcsh, \
/usr/bin/rsh, /usr/local/bin/zsh

Also, (b) One entry that allows drew, smithgr and jimlane to kill jobs and reboot the machines in the student lab. Is that correct???

User_Alias StudentAdmins = drew, smithgr, jimlane, % operator
StudentAdmins ALL = !/usr/bin/su, !SHELLS

Cmnd_Alias Kill= /usr/bin/kill
Cmnd_Alias REBOOT = /usr/sbin/reboot, /usr/sbin/fastboot


Thank you in advance

cmnorton 06-23-2008 01:30 PM

Two ways to access sudoers
 
1) sudo visudo

2) sudo -i
vi sudoers

First way is cleaner.


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