Monday, July 2, 2012

Sudo in Fedora - How can I use sudo even when username is not found in /etc/sudoers file!

So, I was reading some stuff about sudo and /etc/sudoers file, that only users who are in the /etc/sudoers file are able to run sudo command; but when I looked into /etc/sudoers file on my system(Fedora 16) I could not find my username in there, but still I was able to use the sudo command. There was also a folder named /etc/sudoers.d but that was empty. So, how was I able to run the sudo command? After searching for somtime on the internet I came to know that the trick was the following line in /etc/sudoers file

%wheel ALL=(ALL)       ALL

This means give sudo access to all users in the wheel group, and when i looked up my group(using groups command) I indeed was part of the wheel group.

No comments:

Post a Comment