I already edited sudoers
file and sudo
doesn't ask me for the password.
The problem is with Gnome that still displays the prompt.
Is there a way to leave the confirmation dialog, just remove the password thing? I'm not interested in paswordless login, password on login and after screen saver should stay, I just don't want to have to enter it every time I run a GUI app that requires "sudo".
BTW, it's pretty hard to search for this thing. I find either authentication on system (GUI) start, or sudo
, this in Windows is called "UAC prompt", how is it called in Linux? I know the terms "privileges elevation", "run elevated" and such, but they are unrelated to, what I believe is a part of GNOME, right?
UPDATE:
I tried creating a file /localauthority.conf.d/49-nopasswd.rules
polkit.addRule(function(action, subject) {
if (subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});
It did nothing. I am in sudo
group, but the password prompt appears as before. Of course I also did sudo service polkit restart
.
sudo synaptic
is wrong anyway. If you need to call synaptic with root permissions, callsynaptic-pkexec
. This involves PolicyKit taken care of the necessary permissions. Despite that, the window prompting of the password will still appear. I think it is possible to get right of that setting permissions in PolicyKit. Which can be super tricky and openly speaking, I have very little experience doing that. But the take away here hopefully is: it is notsudo
and the sudoers file only which takes care of permissions. PolicyKit is an important part, too.sudo
here?sudo
in combination with a GUI program can mess up your desktop / system if the worst comes to the worse. May not happen, but certainly can happen, as file ownerships and due to that permissions may be misset. pkexec is more advanced with regards to that and certainly should be used if the option is there - like for synaptic.