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
user ALL = NOPASSWD: ALL
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.:
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)?