3

I normally edit my /etc/sudoers file to include my username with some options.

When using apt-get to upgrade, I get the prompt to choose the newer version (dist-version) or my edited version, if the sudoers package has an upgrade.

How do I disable this prompt for just this package? In all other cases, yes I would like to be prompted, so I can see a diff. But in this case, I really don't want the prompt.

Is this possible?

4
  • 2
    Instead of editing /etc/sudoers, add a file to /etc/sudoers.d/ Check /etc/sudoers.d/README
    – muru
    Jan 22, 2017 at 9:10
  • Huh, that's convenient, never thought of that. Thank you. Jan 22, 2017 at 21:56
  • Actually, I take it back. By default, /etc/sudoers.d is not searched. I have to uncomment a line in /etc/sudoers, which kind of beats the purpose in the first place of not touching the default configuration file. Jan 23, 2017 at 4:46
  • Since 12.04, /etc/sudoers.d is searched. If you read the README, like I asked you to, you'd see that it doesn't do so for older versions and systems upgraded from older versions.
    – muru
    Jan 23, 2017 at 4:48

0

You must log in to answer this question.

Browse other questions tagged .