5

I am trying to unlock the users settings in Ubuntu 22.04. I want to change the user settings to enable auto login. At the top right corner there is an unlock button. Clinking on it does nothing. I tried to run: sudo -H gnmoe-control-center and I was able to change the users settings. However, it did not change the user setting while running is again without sudo . I see this message in the terminal when clicking on the unlock button:

(gnome-control-center:5265): Gtk-WARNING **: 13:31:59.648: Error acquiring permission: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying.

Hint: can some settings of xrdp can cause this behavior?

Please help Thank you

hans
  • 71
  • 1
  • 4

1 Answers1

1

This is an expected behavior when using xRDP software and trying to perform some administrative tasks.

The reason behind this behavior is well known now and it's called Polkit.  Polkit is an application authorization framework that capture actions performed by a user and check if the use has been authorized to perform such action or not. Polkit reads some policy files that will specify if the user requested by the user is authorized, not authorized or need authentication.  Action authorized when logged on locally can be different than the one a user might get when connecting remotely (i.e. remote session)

Note : This command is valid up to Ubuntu 23.04 - Ubuntu 23.10 needs another piece of code...

To fix your issue, you have to issue the following command in a Terminal Session

sudo bash -c "cat >/etc/polkit-1/localauthority/50-local.d/47-user-admin.pkla" <<EOF
[user admin]
Identity=unix-user:*
Action=org.gnome.controlcenter.user-accounts.administration
ResultAny=auth_admin_keep
ResultInactive=no
ResultActive=no
EOF

In a few words, this command will create a exception file in the /etc/polkit-1/localauthority/50-local.d folder that will be ready by Polkit solution and will allow you to add users to your system when remotely connected to your xRDP session

Hope this help Till next time

We have written a post about this in our blog..you can always check this link to have more information

Griffon
  • 2,778