This seems a "feature" as it is consistent on all distributions I tried.

On my home development machine I routinely install new software and do other tweaks, typing my password several times/day is not fun so I add a


line to /etc/sudoers.d/user.

This works as expected from the command line (i.e.: sudo apt install whatever will not ask for a password), but it seems to be completely ignored from graphical programs (i.e.: update-manager, synaptic, packagekit and similar tools will ask for a password).

What is the rationale behind this? (or: "what am I doing wrong"?)

Update: a quick perusal of polkit documentation left me a bit baffled: is there a simple way to achieve the same result (Insist for a confirmation, like the need to prepend sudo which is important to draw your attention on potentially dangerous actions, but reduce typing exercise)?


1 Answer 1


They're not using sudo. They're using polkit. Polkit configuration is independent of sudoers.

  • 1
    Thanks. Could You explain why polkit chose not to honor sudoers? ... and, possibly, could You explain how to convince polkit to stop bothering me? (that was the OP question, not how they manage to defeat me)TiA
    – ZioByte
    Sep 16, 2020 at 9:48
  • @ZioByte there's no reason for it to. They work on different principles (sudo works on controlling access to commands, graphical applications using polkit aren't running commands). And your OP question isn't asking how to, but only (and explicitly) why your attempt doesn't work. The how is already answered elsewhere, e.g., unix.stackexchange.com/questions/510927, askubuntu.com/a/614537/158442
    – muru
    Sep 16, 2020 at 9:52
  • @ZioByte if you want to know how to avoid that, please edit your question since it is currently asking why this happens and what the rationale behind it is, not how to avoid it.
    – terdon
    Sep 16, 2020 at 9:54
  • 1
    @terdon: I'll accept this answer. I am a bit pissed off because it seems "root cause" is: someone started using a new marvelous system (polkit) and doesn't give damn if it works well with legacy software (sudo). I understand in OpenSource everyone is free to do whatever he sees fit, but distributions using two completely different systems to achieve the same result at the same time (this is not "alternative") is not nice (to be polite).
    – ZioByte
    Sep 16, 2020 at 10:04
  • It's... considerably more complicated than that, there are very good reasons why sudo should not be used by GUI programs. See, for example, Why should users never use normal sudo to start graphical applications?. I think you probably should ask a new question about this, it really is much more reasonable than you are assuming (although I do understand why you would assume so).
    – terdon
    Sep 16, 2020 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.