Based on the file itself:
Next comes the main part: which users can run what software on which machines (the sudoers file can be shared between multiple systems). Syntax:
user MACHINE=COMMANDS
OK for example we have this:
john.doe ALL=(ALL:ALL) /sbin/ifup, /sbin/ifdown
which means john.doe is given permission to issue the ifup and ifdown commands using sudo. What I don't understand is the part in parenthesis. I just know that the first one is user and the second is group. But what is this for while we already have specified users in the first of line? Thank You
john.doe
is the user who's allowed to runsudo
here, andALL:ALL
refers to the users thatjohn.doe
can run these commands as. (sudo
's not just for running as root - you can run commands as other users too) – muru Mar 16 '22 at 09:04