User not in sudo list but can still use sudo

0

I am running Fedora 17.

My user was created during the live cd install and has root/admin privileges. Hence, I use the sudo command to perform root actions. E.g

sudo iftop

I enter my password and it works.

However, when I access

sudo visudo

My username is not listed.

Can someone explain this?

Thanks

Pete

Posted 2013-10-17T00:24:03.390

Reputation: 25

Also check /etc/sudoers.d https://serverfault.com/questions/574953/user-not-in-sudoers-but-still-can-use-sudo

– AbraCadaver – 2019-12-09T21:00:44.493

An ordinary user doesn't have "root" access in linux other than via sudo (or su). However, your user could be part of a group that has sudo access. If you do id, can you see adm, sudo or any other admin-like groups - check this in visudo too. – Paul – 2013-10-17T02:11:58.540

Answers

2

Assuming you don't mean you're already acting as the root user, you'll likely find an entry in the sudoers file for the wheel group, a line that starts with %wheel, and you'll be in that group (which is stored in the /etc/groups file)

Sirex

Posted 2013-10-17T00:24:03.390

Reputation: 10 321

I believe this is the correct answer. By running the command "groups" I can see that I am in the "wheel" group. – Pete – 2013-10-18T01:58:08.310

0

To adding to Sirex's response above, here's a link with more information about the wheel group.

Also, check the man pages for sudo and sudoers for more information.

dinesh

Posted 2013-10-17T00:24:03.390

Reputation: 581

Isn't that just referring to the user called "root"? I tried running sudo with a user that is in the "root" group but not in wheel or listed as an explicit entry in the sudoers list and this user was not able to execute commands using sudo. – Pete – 2013-10-18T02:00:03.023

I actually tried testing this by removing the root user from the sudoers list. When it was removed I could still access the sudo list using the command "visudo". But then I tried accessing visudo using the command "sudo visudo" it didn't work. But I when I added root ALL=(ALL) ALL back to visudo I could use the command "sudo visudo" as root. – Pete – 2013-10-18T02:06:37.760