Sunday, October 12, 2008

get SUDO to work on Red Hat systems

In the terminal enter su --login -c 'visudo'


Press enter and go through the password for root.

Below the line root ALL=(ALL) ALL add the user (Garfield in this case :-) that you want to have root access as shown below:
Garfield ALL=(ALL) ALL

If you wish sudo to prompt for a password, go down to the line # %wheel ALL=(ALL) ALL and delete the # at the beginning of the line using the x key or use your favorite vi editor commands to edit and navigate around.

If you don't want password prompts (not secure), go down to # %wheel ALL=(ALL) NOPASSWD: ALL and uncoment it.

Save and exit: wq

No comments: