You are not logged in.

#1 2021-08-25 01:32:45

悲剧小白
Member
Registered: 2021-07-13
Posts: 3

[SOLVED] How to use sudo to escalate privileges in gnome

I created an ordinary user with sudo privileges, and used the sudo passwd -l root command to lock the root user.

When opening a privileged directory such as /root in nautilus, the privilege escalation window still uses the su command, which causes the password to never be correct.

I noticed that the privilege escalation window of the ubuntu system uses the sudo command. Is this a modified gnome or a command defined in a configuration file?

Last edited by 悲剧小白 (2021-08-25 12:42:52)

Offline

#2 2021-08-25 08:30:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,431

Re: [SOLVED] How to use sudo to escalate privileges in gnome

These do not use sudo nor su, but polkit and yes polkit asks for the root password by default unless the user in question is in the wheel group: https://wiki.archlinux.org/title/Polkit … identities if you aren't using the wheel group then create a new rule for your user.

Offline

#3 2021-08-25 08:47:28

悲剧小白
Member
Registered: 2021-07-13
Posts: 3

Re: [SOLVED] How to use sudo to escalate privileges in gnome

thanks

I don’t use the wheel group. What I configure in /etc/sudoers is that the sudo group has the right to use sudo commands

I created the /etc/polkit-1/rules.d/50-default.rules file and wrote the following:

polkit.addAdminRule(function(action, subject) {
     return ["unix-group:sudo"];
});

Now, Arch can allow me to enter the user's password to escalate the privilege, and no longer use the root password

Offline

#4 2021-08-25 08:58:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,431

Re: [SOLVED] How to use sudo to escalate privileges in gnome

Great, please mark as [SOLVED] by editing the title in your first post.

Offline

Board footer

Powered by FluxBB