Below is /etc/sudoers.d/Update, it allows installs of software via the cli without a password.
## Installation and management of software Cmnd_Alias SOFTWARE_UPDATE = /bin/rpm, /usr/bin/up2date, /usr/bin/dnf, \ /usr/bin/rkhunter, /usr/bin/needs-restarting, /usr/bin/etckeeper, \ /usr/bin/tig, /usr/local/bin/apt, /usr/bin/apt-get %wheel ALL = NOPASSWD: SOFTWARE_UPDATE %sudo ALL = NOPASSWD: SOFTWARE_UPDATE
Create below in /etc/polkit-1/rules.d/10-my.rules and you won't get asked for a password by the system update software as much.
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.packagekit.upgrade-system" ||
action.id == "org.freedesktop.packagekit.trigger-offline-update" ||
action.id == "org.freedesktop.packagekit.*" ||
action.id == "org.debian.apt.install-or-remove-packages" ||
action.id == "org.aptkit.install-or-remove-packages" ||
action.id == "org.freedesktop.packagekit.package-remove" ||
action.id == "com.ubuntu.pkexec.synaptic" ||
action.id == "com.ubuntu.pkexec.gufw" ||
action.id == "in.teejeetech.pkexec.timeshift-gtk" ||
action.id == "org.gnome.gparted" ||
action.id == "org.nemo.root" ||
action.id == "org.bleachbit" ||
action.id == "com.linuxmint.mintsources" ||
action.id == "org.debian.apt.install-file" ||
action.id == "org.freedesktop.accounts.user-administration" ||
action.id == "org.cinnamon.settings-users" ||
action.id == "org.gtk.vfs.file-operations" ||
action.id == "org.freedesktop.udisks2.modify-system-configuration" ||
action.id == "org.freedesktop.policykit.exec" ||
action.id == "org.freedesktop.udisks2.modify-device-system" ) &&
subject.active == true &&
subject.local == true &&
subject.isInGroup("sudo")) {
return polkit.Result.YES;
}
});