sudo vim /etc/polkit-1/rules.d/49-nopasswd_global.rules
添加如下内容
1 2 3 4 5 6 7 8 9 10 11 12
/* Allow members of the wheel group to execute any actions * without password authentication, similar to "sudo NOPASSWD:" */ polkit.addRule(function(action, subject) { if (( action.id == "org.freedesktop.policykit.exec" || action.id == "org.fedoraproject.FirewallD1.all" || action.id == "org.fedoraproject.FirewallD1.config" || action.id == "org.freedesktop.NetworkManager.settings.modify.system") && subject.isInGroup("wheel")) { return polkit.Result.YES; } });
#%PAM-1.0 auth include system-remote-login account include system-remote-login password include system-remote-login session include system-remote-login
改为
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#%PAM-1.0 auth include system-remote-login -auth optional pam_gnome_keyring.so -auth optional pam_kwallet5.so
account include system-remote-login
password include system-remote-login -password optional pam_gnome_keyring.so use_authtok
session optional pam_keyinit.so force revoke session include system-remote-login -session optional pam_gnome_keyring.so auto_start -session optional pam_kwallet5.so auto_start