Originally posted by: mbozzore, Sun Apr 08, 2007 5:08 am

The best way to edit the /etc/sudoers files is to run the visudo command as root.

The procedure is as follow :

1- log as root on the frontend (or su - from your account). Just su will be confusing because /usr/sbin will not be in your PATH so you will have to use the full path to the visudo command (/usr/sbin/visudo). Then just type visudo.

2- then add the following line (example for my username, full access):

mbozzore ALL=(ALL) ALL

in the section : # User privilege specification

This will allow me to run commands as root on the cluster, and these commands will be logged in /var/log/messages.

Below is an example.

---------------------------
Mar 5 23:24:59 suppocs sudo: mbozzore : TTY=pts/8 ; PWD=/home/mbozzore ; USER=root ; COMMAND=/bin/ls
Mar 5 23:29:09 suppocs sudo: mbozzore : TTY=pts/8 ; PWD=/home/mbozzore ; USER=root ; COMMAND=/usr/sbin/visudo
Mar 5 23:30:19 suppocs sudo: mbozzore : TTY=pts/8 ; PWD=/home/mbozzore ; USER=root ; COMMAND=/bin/grep sudo /var/log/messages
---------------------------
_________________
Mehdi Bozzo-Rey