Difference between revisions of "Linux comand: visudo"

From RHS Wiki
Jump to navigation Jump to search
m (Protected "Linux comand: visudo" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
or<br />
 
or<br />
 
root    ALL=(ALL:ALL) ALL
 
root    ALL=(ALL:ALL) ALL
 +
 +
To allow some unprivileged user to run some commands with sudo:
 +
joe ALL=(ALL) NOPASSWD: /full/path/to/command
 +
or with some arguments:
 +
joe ALL=(ALL) NOPASSWD: /full/path/to/command ARG1 ARG2

Latest revision as of 08:02, 7 June 2018

visudo

To give a user sudo permits

sudo visudo

add line:
pi ALL=(ALL) NOPASSWD: ALL
or
root ALL=(ALL:ALL) ALL

To allow some unprivileged user to run some commands with sudo:

joe ALL=(ALL) NOPASSWD: /full/path/to/command

or with some arguments:

joe ALL=(ALL) NOPASSWD: /full/path/to/command ARG1 ARG2