You are not logged in.

#1 2022-11-12 14:53:26

Bestinbest
Member
Registered: 2020-11-28
Posts: 35

[SOLVED] sudoer file

Hello,

I recently had to reinstall arch on my computer. When I tried to install yay with makepkg, the system refused to make it :

 user is not in the sudoer list 

So I made some research, and I read many times that I needed to manually add my user to the sudoer list, which I reluctantly did (right after the same line with root, in /etc/sudoer) :

 user ALL=(ALL:ALL) ALL

I then tried and this time the system refused to do it because user had too much privilege. I know I am missing something, all went well on my previous installation but it's been a while, and those articles are not very helpful to me ( https://wiki.archlinux.org/title/Users_ … management , https://wiki.archlinux.org/title/Genera … and_groups )

So I want to grant a user admin privilege, but not too much. Can you help me ?

Thanks for reading.

Last edited by Bestinbest (2022-11-12 16:44:58)

Offline

#2 2022-11-12 14:59:03

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] sudoer file

You add yourself to, say, the wheel group and then uncomment the %wheel line in the sudoers.

You can call that group however you want, wheel is just the traditional BSD superuser group, you can call that group however you want.

Offline

#3 2022-11-12 15:05:04

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

Re: [SOLVED] sudoer file

I then tried and this time the system refused to do it because user had too much privilege.

Do not run makepkg as root (i.e. with sudo). If it needs root user access at any point, it will prompt you as required.

https://wiki.archlinux.org/title/Makepkg#Usage

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 2022-11-12 15:38:30

Bestinbest
Member
Registered: 2020-11-28
Posts: 35

Re: [SOLVED] sudoer file

Thanks for your replies.
I added my user to the wheel group while in root, and it is. But once I get out of the root mode, the user is no longer in it. I don't understand what I did wrong :

[root@Yack opt]# usermod -aG wheel yack
[root@Yack opt]# groups yack
wheel yack
[root@Yack opt]# exit
exit
[yack@Yack opt]$ groups
yack

Offline

#5 2022-11-12 15:57:14

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

Re: [SOLVED] sudoer file

See the note in the first purple box: https://wiki.archlinux.org/title/Users_ … management


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

#6 2022-11-12 15:57:39

astralc
Member
Registered: 2022-09-17
Posts: 127

Re: [SOLVED] sudoer file

groups are applied when the user login (unless you use newgrp command, for shell with the group), so relogin (fully, including DE/WM, not just opening terminal)

Offline

#7 2022-11-12 16:44:36

Bestinbest
Member
Registered: 2020-11-28
Posts: 35

Re: [SOLVED] sudoer file

Thanks a lot to everyone, it's solved !

Offline

Board footer

Powered by FluxBB