CentOS: Admin user on xrdp session can't do admin
Solution 1:
Having framed yesterday's frustrations more succinctly, I used a well-known search engine to look for "linux polkit local and remote sessions" and got this as the top result - Enabling system management privileges for non-local users - How the heck does polkit
work, anyways? The answer (slightly modified from the linked question) is to create a file /etc/polkit-1/localauthority/50-local.d/10-remote-admin-allow.pkla
containing
[Allow Remote Admin]
Identity=unix-group:wheel
Action=*
ResultAny=auth_admin_keep
ResultInactive=auth_admin_keep
ResultActive=auth_admin_keep
and run systemctl restart polkit
(which is vital but was missed in the other question). You can also put this file under /var/lib/polkit-1
, but according to pklocalauthority.8 the former is intended for local configuration while the latter is for 3rd party packages.