1

I'm in the sudoers file (username ALL=(ALL) ALL, but am not the root user on a machine.

When I want to install something from Ubuntu Software, or want to execute some other root operation from a GUI, I get the following popup:

root popup

This popup shows the root user (name redacted in image), not me. I have the permission to do this operation (I'm in the sudoers file after all), but the popup doesn't give me any option to change the user that should do the operation. How do I solve this? I can of course execute the corresponding command with sudo from the terminal, but I'd like to be able to use the GUI as well.

BrtH
  • 113

1 Answers1

2

The popup is likely from PolicyKit rather than from sudo directly.

Although PolicyKit itself allows fine-grained control of authentication, the default configuration simply assumes that all members of the sudo and admin unix-groups should be treated as administrators; it doesn't consider the contents of /etc/sudoers or apply any per-user rules therein

[Configuration]
AdminIdentities=unix-group:sudo;unix-group:admin

You have two options: either simply add your user to the sudo group instead of using the username ALL=(ALL) ALL sudoers entry, or add a custom PolicyKit configuration file as described below

See also

steeldriver
  • 136,215
  • 21
  • 243
  • 336