SUDO even in the soup

Many years ago, when I started with GNU/Linux system administration, although SUDO existed and was known, it did not have the overblown importance it’s given today.

SUDO is a tool with a specific and essential purpose. The problem is that nowadays it is being treated as the de facto standard for any action requiring root privileges, supposedly adding an extra layer of security. And this is false: the moment you can launch a shell with root privileges using sudo, that extra security becomes purely superficial. Even the potential usefulness of logging which privileged action was executed by which user becomes meaningless.

If I remember correctly, it was Ubuntu that started popularizing its use. As a protection layer for desktop users performing specific actions requiring privileges — using a little authentication window for that particular event — it’s interesting to use it, since it allows an inexperienced user to perform specific tasks without even really knowing what they’re doing (does this remind you of Win… ?).

But let’s not fool ourselves: if you are going to work in a shell and routinely perform privileged actions, sudo is not the way. It is a waste of time and makes no sense. The system administrator has had and should have the importance and responsibility they deserve; and if their fingers tremble because they’re in a root shell accessed with the veteran su or directly via an SSH key, then perhaps they should do something else.

I would even dare to say that its routine use can be dangerous. If, as an administrator, you know you carry the responsibility of root on your shoulders, you don’t get careless; you pay attention to every key you press and take a microsecond to think before hitting the irrevocable “enter.” But with “sudo,” things change: you might believe you are protected by it, yet your actions can be just as disastrous. That false sense of security can make you relax (not to mention getting dizzy from reading sudo everywhere) and commit serious mistakes.

SUDO can be very useful if, for example, you want to give a developer the ability to restart a service that requires root privileges on their own — and nothing else. Here its purpose is correct, and that’s what it was designed for, not to replace a root shell.

Finally, the following should also be considered: any extra application in the system that allows privilege escalation is, by its very nature, a risk vector, since it is not free from possible security bugs that could compromise the system (https://www.sudo.ws/sudo/security.html)

Everyone is free to manage their systems as they see fit. Personally, unless it is truly necessary for a specific and justified use, I prefer to keep sudo out of my systems.

Leave a Comment

Este formulario guarda los datos que indiques de nombre, email y comentario para poder realizar un seguimiento de los comentarios dejados en cada entrada.