When launching some apps (e.g., GParted, Synaptic, or Grub Customizer), install/uninstall packages with App Center or Software Updater, it always pops-up a dialog asking for admin password to authenticate.
This tutorial is tested and works on Ubuntu 24.04 and Debian 12. It should also work in Linux Mint 22, but NOT for Ubuntu 22.04 and earlier.
Ubuntu and many other Linux use polkit for controlling system-wide privileges. It’s an authentication framework that provides a finer control of access rights for graphical desktop environments.
And, here I’m going to show you how to configure polkit to disable password authentication for either global or specific actions, when running with certain user or group.
NOTE: Option 1 and option 2 do NOT stop your system from asking password when running sudo command in terminal. It only works for graphical authentication pop-ups! See option 3 if you need for sudo command.
For security reason, it’s not safe to disable the authentication pop-up globally. But it seems less dangerous to disable it for some actions, such as install updates through “Software Updater”.
Like option 1, run command below to create a config file (also replace gnome-text-editor accordingly): sudo gnome-text-editor /etc/polkit-1/rules.d/49-nopasswd_limit.rules
This is an optional step has nothing to do with polkit. Also, it’s NOT safe, since it grants root permission to the entire command process. With it, even remote SSH login can run sudo command without password!
Finally, press Ctrl+S to save, and Ctrl+X to exit.
Here, replace ji to your username. Finally, press Ctrl+S to save, and Ctrl+X to exit.