Ask Your Question
3

Why can I use sudo even without being mentioned in the /etc/sudoers file?

asked 2012-01-31 13:29:00 -0500

atobi gravatar image

updated 2012-02-02 02:54:05 -0500

FranciscoD_ gravatar image

Hi,

I'm confused. I was reading up on the whole su/sudo distinction when I came across the /etc/sudoers file. I read on many websites that adding a user to this file allows this user to do certain actions under the sudo command (so, if the user is not added to the file, this user will not be able to use the sudo command).

But when I check the /etc/sudoers file in my own system, I do not see my own username in there, yet I can use the sudo command for everything I want (if i enter a my own password)...

Could someone clear this up for me?

Thanks,

Glenn

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
9

answered 2012-01-31 14:25:06 -0500

domg472 gravatar image

There is this one uncommented line in /etc/sudoers:

%wheel ALL=(ALL) ALL

It means that any user that is in the wheel group is allowed to run sudo.

During the Fedora firstboot process one is asked to create a user, There is a checkbox displayed there that say's "Add user to administrator group". When you check that, this will cause the user to be assigned to the "wheel" group.

This means that if you are part of the "wheel" administrator group, you are allowed to run sudo.

To verify whether you are in the wheel group run:

groups

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-01-31 13:29:00 -0500

Seen: 1,717 times

Last updated: Feb 02 '12