The advantages of a "non root, unlimited superuser" are essentially nil (unless you count the protection against brute force attacks - many more attempts will be done against root
than against server
).
The advantages appear as soon as you delegate functions and create a set of limited superusers, or superuser commands through the sudo
mechanism, because this way you can run those administrative tasks -- and only those. A successful break-in in the "webserver admin" personality will then be able to restart a webserver or rotate logs, but not install administrative software, run privileged commands, lower the firewall shields.
Of course this assumes that you have defense in depth - for example the "create new file for website" function of sudo
will check that the new file requested is not a special file, is not executable, and is in a valid webroot. The sudo gcc
command will have to verify that the issuer is not overwriting a system binary with a different file, and so on. If by just typing sudo su
an ordinary user can get superuser privileges, then the system might actually be less secure than if it only had a root user (think of a fire-and-forget "joe" account with guessable password: in such a case, it would supply a ready backdoor to rootdom).
0
? I think you can have a non-root root quite simply by editing/etc/passwd
. – terdon Apr 06 '14 at 16:02