I have edited /etc/sudoers as followes:
Code:
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
Host_Alias MICOplus=FAST21.mailserver.com, FAST22.mailserver.com
Host_Alias LINUXHELP=receiver.groupultra.com, thete.logicacmg.com
# User alias specification
User_Alias ADMINS = joe, bill, jake
User_Alias PARTTIME = jim,jeff,mike
User_Alias LINUXGROUP = lyte, sirplaya
# Cmnd alias specification
Cmnd_Alias BROWSE = /bin/ls, /bin/cd, /bin/cat
Cmnd_Alias KILL = /bin/kill
Cmnd_Alias USERS = /usr/sbin/adduser [A-z]*,/usr/sbin/userdel -r [A-z]*
Cmnd_Alias SERVICE = /etc/init.d/sshd restart
# Defaults specification
# User privilege specification
root ALL=(ALL) ALL
#---------------------------EXPLORING USAGE OF SUDO------------------------------------------------#
#
#This allows the users in the PARTTIME alias (jim,jeff,mike) to do all of the commands listed in USERS,KILL,SERVICE and BROWSE aliases on all servers. In addition to that, they may run /usr/bin/passwd followed by a 1 letter word or more (username of password to change) but the last option says that they CANNOT change root's password.
#! is used to represent the word "NOT"
#
#-------------------------------END DOC------------------------------------------------------------#
PARTTIME ALL=USERS,KILL,BROWSE,/usr/bin/passwd [A-z]*, !/usr/bin/passwd root
PARTTIME ALL=SERVICE
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
# Samples
# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
When I logged in as jim opening another terminal it says:
Code:
[jim@receiver ~]$ sudo ls
>>> sudoers file: syntax error, line 8 <<<
sudo: parse error in /etc/sudoers near line 8
[jim@receiver ~]$