Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

The last line of the /etc/sudoers file is:

grep -i sudosudo /etc/sudoers
Cmnd_Alias SUDOSUDO = /usr/bin/sudo
ALL ALL=!SUDOSUDO

why? What does it exactly do?

share|improve this question
SUDOSUDO is probably an alias. Does it exist elsewhere in the file? – Chris Down Dec 6 '12 at 12:53
question updated :D - so what does it means exactly? – gasko peter Dec 6 '12 at 14:21
is "ALL ALL=!SUDOSUDO" as the last line is like when having DROP iptables POLICY and still using a -j DROP rule as last rule in ex.: INPUT chain? :D or does it has real effects? – gasko peter Dec 6 '12 at 14:30
I'm not 100% sure, but I believe it only prevents anyone from running sudo sudo .... – Kevin Dec 6 '12 at 14:48

1 Answer

up vote 3 down vote accepted

That is to prevent someone from running sudo sudo, but it's not very effective.

It is easily circumvented by copying the sudo binary to another location. for example: cp /bin/sudo /sbin/sudo; sudo /sbin/sudo su -.

Best thing to do is not allowing "root ALL=(ALL) ALL"

share|improve this answer
"Best thing to do is not allowing "root ALL=(ALL) ALL"" - is this line OK? – gasko peter Dec 7 '12 at 6:38
can you Please post a real life example for this "not being effective" in the answer? – gasko peter Jan 23 at 17:42
Why would somebody want to disallow running sudo with sudo? – Evan Teitelman Apr 10 at 13:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.