FreeKB - sudo (give a user permission to run certain commands)
Linux Commands - sudo (give a user permission to run certain commands)

This assumes you are familiar with the /etc/sudoers file

Use the visudo command to edit the /etc/sudoers file. The syntax of lines in the /etc/sudoers file is users hosts=(user:group) commands. In this example, user john.doe is given permission to issue the ifup and ifdown commands using sudo.

john.doe ALL=(ALL:ALL) /sbin/ifup, /sbin/ifdown

 

The NOPASSWD option can be included to ensure that the sudo command does not prompt the user for their password.

john.doe ALL=(ALL:ALL) NOPASSWD: /sbin/ifup, /sbin/ifdown

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 2d0fe in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |