You are not logged in.

#1 2023-02-18 15:15:24

mtubarch
Member
From: Italy
Registered: 2023-02-16
Posts: 46

[SOLVED] "unprivileged user" is not in the sudoers file

After installation I created an unprivileged user:
$ useradd -m -G wheel,sys -s /bin/bash [unprivileged user]
After login I tried
$ sudo pacman -Syu
but I got this message:
[unprivileged user] is not in the sudoers file.
Did I do something wrong during installation?
If so, where in the Wiki can I find the instructions?
Thank you very much in advance.

Last edited by mtubarch (2023-02-18 16:57:55)

Offline

#2 2023-02-18 15:24:50

3beb6e7c46a615a
Member
Registered: 2021-03-27
Posts: 165

Re: [SOLVED] "unprivileged user" is not in the sudoers file

sudo doesn't allow any user to use sudo in its default configuration; you need to explicitly configure sudo to allow access for the user account or for the wheel group.   See https://wiki.archlinux.org/title/Sudo#Example_entries

Offline

#3 2023-02-18 15:26:11

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,564
Website

Re: [SOLVED] "unprivileged user" is not in the sudoers file

Mod note: moving to NC.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2023-02-18 16:05:10

adventurer
Member
Registered: 2014-05-04
Posts: 128

Re: [SOLVED] "unprivileged user" is not in the sudoers file

mtubarch wrote:

After installation I created an unprivileged user:
$ useradd -m -G wheel,sys -s /bin/bash [unprivileged user]
After login I tried
$ sudo pacman -Syu
but I got this message:
[unprivileged user] is not in the sudoers file.
Did I do something wrong during installation?
If so, where in the Wiki can I find the instructions?
Thank you very much in advance.

https://wiki.archlinux.org/title/Users_ … management

And it has to be done as root not as user as you've obviously tried to do.

Offline

#5 2023-02-18 16:12:23

mtubarch
Member
From: Italy
Registered: 2023-02-16
Posts: 46

Re: [SOLVED] "unprivileged user" is not in the sudoers file

OK, I am going to try, as root,
$ EDITOR=nano visudo
$ visudo
and I will uncomment under the string «uncomment to allow members of group wheel…»

Offline

#6 2023-02-18 16:18:38

adventurer
Member
Registered: 2014-05-04
Posts: 128

Re: [SOLVED] "unprivileged user" is not in the sudoers file

mtubarch wrote:

OK, I am going to try, as root,
$ EDITOR=nano visudo
$ visudo
and I will uncomment under the string «uncomment to allow members of group wheel…»

Everything is said on that wiki site:

Execute

su

and

# gpasswd -a your_user wheel

logoff and login again, and everything should work.

Offline

Board footer

Powered by FluxBB