[root@notebook ~]# grep root /etc/sudoers
root    ALL=(ALL)   ALL

Question: Why does the root user need sudo permissions? I've seen it on different UNIX OSes. Can someone please explain this?

  • 4
    sudo != root. Jan 13, 2015 at 22:19

3 Answers 3


So that they can (from the man page):-

execute a command as another user

sudo isn't limited to allowing regular users to execute a command as root. Root can run a command as another user with:-

sudo -u bloggs <command>

Note that root will not need to supply the user's password.

  • 2
    su -c '<command>' bloggs
    – Joshua
    Jan 14, 2015 at 0:35
  • Yes, it is a surrogacy method and root is merely a very common usage.
    – mckenzm
    Jul 25, 2015 at 23:56

Suppose you have a script that does a bunch of things without needing special privileges, and then a single privileged thing that it does through sudo.

If you want this script to be useful for root too, it is convenient that this final sudo command won't refuse working because "you're root; root is not allowed to sudo".

Configuring this in sudoers instead of hardcoding an exemption for root in the sudo binary reduces the complexity of the security-critical code in sudo (however slightly), which is always a good thing.

  • 1
    And besides, I've more than once accidentally started an admin-level command with sudo while I already was root, just because it's ingrained into my muscle memory... Jan 14, 2015 at 9:22

The reason given in the original sudo manual (sorry no online version I know of) was for logging active commands wherever possible when logged in as root.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .