LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   sudo doesn't work (https://www.linuxquestions.org/questions/red-hat-31/sudo-doesnt-work-4175414987/)

AlexFr 07-05-2012 01:35 AM

sudo doesn't work
 
Trying to execute sudo, I get this answer: user is not in the sudoers file. How can I fix this to make sudo working for me?

evo2 07-05-2012 01:44 AM

Hi,

you need to configure sudo by editing the sudoers file (/etc/sudoers). It is best to do this "safely" (locks the file and checks for simple syntax errors) using visudo as root.
Eg
Code:

visudo
You can specify which editor to actually use with the EDITOR environment variable.
EG.
Code:

EDITOR=nano visudo
There are plenty of howtos on the web discussing sudo configuration.


Evo2.

AlexFr 07-05-2012 04:55 AM

I found exact instructions here: http://www.garron.me/linux/visudo-co...lt-editor.html
Addind the line
username ALL=(ALL) ALL
solved the problem.


All times are GMT -5. The time now is 11:04 PM.