Pages

Saturday, April 13, 2013

linux user not in sudoers error,giving root permissions to a user

To give root permissions to a user the way out is

We need to edit a file called  

/etc/sudoers 

Note: (I am using CentOS) while writing this one down so customize acordingly

This file orignally has readonly permission for root which must be changed from its properties=>permissions which must be changed to read and write permissions

Now open this file using your favorite editor I am using G Edit

And look for a command like

# User privilege specification
root    ALL=(ALL) ALL
 
This specifies
 
The root user can execute from ALL terminals, acting as ALL (any) users, and run ALL (any) command. 
 
Add your 
username ALL=(ALL) ALL

for example for me it was 

gaurav ALL=(ALL) ALL

that's it

No comments:

Post a Comment