You are not logged in.

#1 2021-08-20 08:47:53

papasfragiskos
Member
Registered: 2020-11-20
Posts: 9

[SOLVED] Problem with the sudoers file.

Hello. I'm trying to allow my user to run "sudo mount" and "sudo umount" without needing a sudo password. So I add this line in my sudoers file (yes my user is in the wheel group)

%wheel ALL=(ALL) NOPASSWD: /usr/bin/mount, /usr/bin/umount

But when i try to run any command (for example sudo pacman -Syu), sudo complains that my user is not in the sudoers file. So I replace the above line with

myusername ALL=(ALL) NOPASSWD: /usr/bin/mount, /usr/bin/umount

But, again, when i try to run any other command (like sudo pacman -Syu) it complains that my user doesn't have permision to use that command. Why is that? What am I doing wrong? I just want to use mount and umount without a password. All of the other commands i want them to require a password.

Last edited by papasfragiskos (2021-08-20 09:26:43)

Offline

#2 2021-08-20 09:05:32

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,310

Re: [SOLVED] Problem with the sudoers file.

Don't remove the third ALL:

%wheel ALL=(ALL) ALL, NOPASSWD: /usr/bin/mount, /usr/bin/umount

Last edited by V1del (2021-08-20 09:05:46)

Offline

#3 2021-08-20 09:27:16

papasfragiskos
Member
Registered: 2020-11-20
Posts: 9

Re: [SOLVED] Problem with the sudoers file.

V1del wrote:

Don't remove the third ALL:

%wheel ALL=(ALL) ALL, NOPASSWD: /usr/bin/mount, /usr/bin/umount

Thank you very much

Offline

Board footer

Powered by FluxBB