Hacker News new | ask | show | jobs
by biorach 964 days ago
> we should really be asking ourselves if we need all this complexity in something so critical

What is all the complexity? What is all the extra functionality that sudo offers?

4 comments

The ability to specify limited groups of commands that a subset of users can run, among other things.

The "Examples" section of the sudoers(5) man page is probably a good place to start to get an idea of the sorts of ways it can be configured

https://manpages.debian.org/bookworm/sudo/sudoers.5.en.html#...

So I inherited a machine in our lab last week (not a "production" or "test" server, just a random machine being used as a dev environment) and decided to change its hostname using systemd's hostnamectl. Subsequently every attempt to execute a command via 'sudo' caused it to hang for multiple tens of seconds before declaring it couldn't resolve the new (nonexistent, entirely local) hostname. This persisted until I eventually fixed the /etc/hosts file which the systemd thing had failed to do, and I still don't know why sudo wanted to look up this hostname over the network, or what bad things could've happened if one of the configured DNS servers had maliciously replied for it.
Have you checked the sudoers?
sudoedit would be an example.
Good question, never used it.