Hacker News new | ask | show | jobs
by lttlrck 728 days ago
Maybe also make /usr/bin/sudo immutable? would that help prevent a package manager from messing with it? I think so.
2 comments

The downside of this is that if you have your system set up to automatically install package updates, then it will start failing, which might kill all automatic updates.

On Debian, for example, I have unattended-upgrades set up to automatically install security updates. sudo is reasonably likely to have updates for security reasons.

How would you do that?
lsattr - for reading attributes chattr - for setting them

You need the `i` attribute. But this is filesystem dependent. Anyway protecting the `sudo` binary from package managers is a so-so idea.

man chattr