You are not logged in.
I want my default user to be able to execute all the actions without the need to type a password.
So i tried to use the following from the arch wiki:
/* Allow members of the wheel group to execute any actions
* without password authentication, similar to "sudo NOPASSWD:"
*/
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});My user is in the wheel group:
koko@Gozer# groups|grep wheel
root bin daemon sys adm tty disk lp mem kmem wheel #[..]But this is what happens when i try to save a document belonging to root via kwrite; it ask me for a password, i type the wrong one.
# journalctl -f
apr 27 15:28:52 Gozer dbus-daemon[533]: [system] Activating service name='org.kde.ktexteditor.katetextbuffer' requested by ':1.1193' (uid=1012 pid=13994 comm="kwrite /usr/share/plasma/plasmoids/org.kde.desktop") (using servicehelper)
apr 27 15:28:52 Gozer dbus-daemon[533]: [system] Successfully activated service 'org.kde.ktexteditor.katetextbuffer'
apr 27 15:28:55 Gozer polkit-agent-helper-1[14168]: pam_unix(polkit-1:auth): authentication failure; logname= uid=1012 euid=0 tty= ruser=root rhost= user=root
apr 27 15:28:58 Gozer polkitd[9070]: Operator of unix-session:c163 FAILED to authenticate to gain authorization for action org.kde.ktexteditor.katetextbuffer.savefile for system-bus-name::1.1193 [kwrite /usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml] (owned by unix-user:koko)On top of that, i noticed that /etc/polkit-1/rules.d/50-default.rules uses "AddAdminRule" for every user that is in the wheel group; i tried to comment it, but things don't change that much; it still asks for a password, maybe the user password.
This is the log (wrong password on purpose)
apr 27 15:32:43 Gozer dbus-daemon[533]: [system] Activating service name='org.kde.ktexteditor.katetextbuffer' requested by ':1.1193' (uid=1012 pid=13994 comm="kwrite /usr/share/plasma/plasmoids/org.kde.desktop") (using servicehelper)
apr 27 15:32:43 Gozer dbus-daemon[533]: [system] Successfully activated service 'org.kde.ktexteditor.katetextbuffer'
apr 27 15:32:45 Gozer polkitd[9070]: Operator of unix-session:c163 FAILED to authenticate to gain authorization for action org.kde.ktexteditor.katetextbuffer.savefile for system-bus-name::1.1193 [kwrite /usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderItemDelegate.qml] (owned by unix-user:koko)What am i doing wrong? Is the wiki right?
-EDIT-
already tried to logout/login, not reboot.
Last edited by kokoko3k (2018-04-28 14:04:43)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Well, solved.
For some reasons, the polkit rules directory permissions were set wrong.
the polkit user appeared as "proxy" user; can't say why.
To be fair, in the journal, only now i noticed that polkit said that at service startup time, but i didn't bother to check the journal earlier because the auth message actually changed when i changed the rules (you can check), so i assumed it was reading them.
BAH!
Last edited by kokoko3k (2018-04-28 19:56:46)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline