Following is the syntax i am using to provide a group to run only dnf command using sudo without password.
%groupname All=(ALL:ALL) NOPASSWD: dnf
After closing the sudoers file , i am running into an error in the above line. Please help . Thanks
Following is the syntax i am using to provide a group to run only dnf command using sudo without password.
%groupname All=(ALL:ALL) NOPASSWD: dnf
After closing the sudoers file , i am running into an error in the above line. Please help . Thanks
Hi @trung-kodekloud ,
Thanks, Appreciate your reply.
I tried using the above mentioned syntax : %groupname ALL = NOPASSWD: /bin/dnf . It isnt working.
And the command is dnf , not df.
Sorry,
I thought it was disk free command df
, let me try other options.
Thanks,
Trung.
You should use visudo
to edit sudoers - you probably are if is telling you error immediately.
Prerequisites for this are
dnf
which dnf
For example, if the group is devs
and dnf is at /usr/bin/dnf
then it will be
%devs ALL=(ALL) NOPASSWD:/usr/bin/dnf