Artix Linux Forum

Artix Linux => System => Topic started by: mardiyah on 06 July 2023, 03:09:55

Title: Specifying executable name in sudoers in order to pass password
Post by: mardiyah on 06 July 2023, 03:09:55
Why has put an executable name in sudoer, but run it still get asked password ?

this is what is edited after by way of $ sudo visudo (user name illustrative)
Code: [Select]
foobar ALL=(ALL) NOPASSWD: /usr/bin/lsblk
.
Code: [Select]
$ ls -l /usr/bin/lsblk
 -rwxr-xr-x 1 root root 137168 Jun 27 21:32 /usr/bin/lsblk


but still ask password, how to correct it?
Title: Re: Specifying executable name in sudoer in order to pass password
Post by: suren on 06 July 2023, 04:47:04
I don't know if your syntax is correct, But I'm sure the following one is correct
Code: [Select]
foobar ALL=(ALL:ALL) NOPASSWD: /usr/bin/lsblk