You are not logged in.

#1 2024-06-10 14:17:03

Qvest
Member
Registered: 2024-06-04
Posts: 5

[SOLVED] $ visudo: /etc/sudoers: Permission denied

Solved in post #2

Hello, I've been having problems trying to use visudo without sudo. Trying to visudo as normal user with wheel group gives me permission denied, even though I have the following in /etc/sudoers:

## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL:ALL) ALL

The only way for me to run

$ visudo
visudo: /etc/sudoers: Permissão negada (Permission denied)

is to run

$ sudo visudo

I don't know if this is intended or not. Running

$ sudo visudo -c
/etc/sudoers: análise OK
/etc/sudoers.d/00_anon: análise OK

Groups of my user:

$ groups anon
wheel anon

Is this intended behaviour or is something wrong with my configuration? Permissions for /etc/sudoers shows:

$ ls -l /etc/sudoers
-r--r----- 1 root root 4,2K jun 10 10:22 /etc/sudoers

Thanks for your time and any answers!

Used archinstall with Minimal profile and checked sudo for my user. I also did not create a root account or set a password for it.

Last edited by Qvest (2024-06-10 14:40:26)

Offline

#2 2024-06-10 14:39:33

Qvest
Member
Registered: 2024-06-04
Posts: 5

Re: [SOLVED] $ visudo: /etc/sudoers: Permission denied

It seems like this is intended behaviour in Arch. I guess I was expecting a sudo password prompt when running only visudo. Marking this as solved

Offline

#3 2024-06-11 09:57:17

Nikolai5
Member
From: North West, England, UK
Registered: 2024-01-27
Posts: 275

Re: [SOLVED] $ visudo: /etc/sudoers: Permission denied

It is intended behaviour. Being able to edit the sudoers file as a regular user would defeat the objective.

Unless you mean have it automatically prompt for password when trying to run an administrative command, but that has to be purposefully implemented, like how makepkg does it, otherwise it won't.


Ryzen 7 9850X3D | AMD 7800XT | KDE Plasma

Offline

Board footer

Powered by FluxBB