How is this user able to sudo su to root?
How is this user able to sudo su to root?
Code:
[terry@CentOS7 ~]$ whoami |
The answer is in groups and sudoers.
|
Look into the sudoers file.
|
instead of all that "cat'iness", try
Code:
id terry |
Code:
# cat /etc/sudoers |grep -v \# |
Again look at your sudoers file. Wheel group doesn't permit or deny anyone anything.
|
You're right, the wheel group doesn't matter when sudo is used.
But /etc/sudoers doesn't seem to have anything specific for the terry user, and if I add a user called test, that is not able to sudo su: Code:
[root@centos7terry]# su test |
I have no idea what is up with your system and your permissions, but here's a tip; save yourself some pipes and ditch the cat in:
Code:
cat /etc/group |grep terry Code:
cat /etc/sudoers |grep -v \# You can (and should!) issue those commands like this: Code:
grep terry /etc/group Code:
grep -v '^#' /etc/sudoers Best regards, HMW |
What is the output of the following command:
Code:
sudo -l -U terry |
Well here's my answer.
Where is this set though? Like if I want to disable it, or reenable it later? Code:
$ sudo -l -U terry |
That in itself shows that terry has full rights to run ALL commands without using a password.
Did terry at one time have sudo rights? |
Quote:
|
I'm at the end of my knowledge with this one. Some how he has the elevated rights but nothing shows that he should.
If you reboot the VM does terry still have sudo rights? |
Quote:
Quote:
|
What type of virtual machine?
Typically sudo is not configured on Red Hat/CentOS systems. My CentOS 7 is basically an as is min install. |
All times are GMT -5. The time now is 01:05 AM. |