Linux Labs

Users, permissions, and processes / Stage 8 of 13

Delegating commands with sudo

Not running Starting usually ~20 s
Leave the lesson

Step 8 of 8 · summary · 2 min

Summary

  • A sudoers rule lets a specific user or group (%group) run a specific command as a specific account.
  • The rule goes into a separate file in /etc/sudoers.d through visudo -f, gets mode 0440, and the whole configuration is checked with visudo -c.
  • parsed OK is grammar; the meaning is checked with sudo -l -U and with calls made as the grantee: the allowed one passes, a neighbouring one does not.
  • At the start of the lesson labops got two lines and a refusal for three: the rule allowed exactly tail -n 2, and sudo let no other call through without a password.
Ubuntu 24.04
Loading…