If I try using sudo as a non-privileged user, I get a message that the user is not in the sudoers file. I know the Administrator password, but I do not know, how to use it from a non-privileged (Standard) user.
If I try using sudo as a non-privileged user, I get a message that the user is not in the sudoers file. I know the Administrator password, but I do not know, how to use it from a non-privileged (Standard) user.
Use
pkexec
instead. If the current user doesn't have privileges, or if there are multiple users who can authorize an action, it will prompt you to select the user:pkexec
, of course, does not follow thesudo
configuration, but its own. However, if you added admin users by adding them to thesudo
group, they will also be granted Polkit admin rights by Ubuntu's default configuration.To go from a nonprivileged user to a
sudo
user, you do not usesudo
.Instead, you first have to switch users.
Login as the other user with the following command from
nosudo
user (assumingnosudo
is the nonprivileged user,yessudo
is the sudoer):It will then prompt for the login password for
yessudo
. After you login asyessudo
you can runsudo
commands from that user. If at any time you exit out of that and return to thenosudo
user, you have to do the command above again.