Any one to help in this challenge guys. I seems to be missing somewhere."Make su . . .

Hillary Kipkorir Langat:
Any one to help in this challenge guys. I seems to be missing somewhere.“Make sure all users under “devs” group can only run the “dnf” command with “sudo” and without entering any password.” I used visudo then %devs ALL=(ALL) NOPASSWD: /bin/dnf. But i am getting task not complete.

Aaron Lockhart:
Which challenge number is this for?

Hillary Kipkorir Langat:
challenge 3

Aaron Lockhart:
First, make sure you have created the devs group.

After you have created it, make sure you specify the correct path to dnf. The path is not correct in the screenshot you provided. You can use which dnf to get the correct path.

Hillary Kipkorir Langat:
Thank you very much. It required full path as in /usr/bin/dnf

@Aaron-Lockhart /bin/dnf is a soft link of /usr/bin/dnf right ?? So Both should be correct right ?? If not then in which cases should we use /usr/bin/ or /usr/sbin/ and /bin/ or /sbin/ ??

@yalla.vishal: When referencing an executable like this, you should be using the path to the executable instead of a link. This is why I suggested using the output of which dnf.

@Aaron-Lockhart Thank you very much for clearing my doubt. So the thing I observed when using which for various commands is that mostly it is showing /usr/bin/ or /usr/sbin/ paths which u mentioned are paths of direct executables instead of links.

Unfortunately your suggestion doesn’t help (in this particular Linux challenge 3 of kodekloud). ‘which dnf’ results in ‘/bin/dnf’, but accepted answer is only the one which contains ‘/usr/’ in the path, as in ‘/usr/bin/dnf’ or ‘/usr/bin/dnf-3’:

lrwxrwxrwx. 1 root root 5 Aug 4 2020 /usr/bin/dnf → dnf-3

As you can see, even symlinks are accepted. This is something (I guess) hardcoded in this challenge.