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

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

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..)

  • 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

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"

  • 2
    Why would somebody want to disallow running sudo with sudo? – user26112 Apr 10 '13 at 13:01
  • 1
    Why would you run sudo sudo? – Alko Aug 12 '13 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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