Take the 2-minute tour ×
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?

UPDATE#1: Now I know that it prevents users to use the: "/usr/bin/sudo".

UPDATE#2: not allowing "root ALL=(ALL) ALL" is not a solution.

Updated Question: What is better besides this "SUDOSUDO"? (the problem with this that the sudo binary could be copied..)

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 1

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
    
Why would somebody want to disallow running sudo with sudo? –  paraxor Apr 10 '13 at 13:01
    
Why would you run sudo sudo? –  Alko Aug 12 '13 at 12:22

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.