FWIW, below inside code tags, works on my 12.2 Slackware. I just need for user "al". And it on a home LAN ie security level not needed to be high. BTW I do not use visudo. As root I cp the sudoers thus
root@P5Q:~# cp /etc/sudoers /home/al/sudoers.txt
root@P5Q:~# chmod -w /home/al/sudoers.txt
root@P5Q:~# chown al.users /home/al/sudoers.txt
Then, as user al, I edit sudoers.txt with the kate editor. Once edited to my liking, as root, I then do
root@P5Q:~# cp /home/al/sudoers.txt /etc/sudoers
And the file permissions on it auto revert to what they formerly were (no write permissions and etc.)
Code:
root@P5Q:~# cat /etc/sudoers
# 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
# User alias specification
User_Alias TRUSTED = al
# Cmnd alias specification
Cmnd_Alias SRVC = /usr/sbin/apachectl,/sbin/arp,/usr/bin/slrnpull,/sbin/halt,/sbin/reboot
Cmnd_Alias TOOLS = /sbin/mount,/sbin/umount,/home/al/bin/cdrecordeasy,/usr/local/bin/samba_do
Cmnd_Alias FIREW = /usr/local/bin/firehol, /usr/local/bin/rc.vmware
Cmnd_Alias PRNT = /usr/local/bin/cups.sh,/usr/bin/ethereal,/usr/local/bin/kqemu_do
# Defaults specification
Defaults:TRUSTED !lecture
Defaults:al !authenticate
# Runas alias specification
# User privilege specification
root ALL=(ALL) ALL
# 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
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
TRUSTED ALL = NOPASSWD:SRVC,TOOLS,FIREW,PRNT
root@P5Q:~#