S

Sudo

Sudo is a Unix/Linux command that allows users to run programs with the security privileges of another user, typically root.

What is Sudo?

Sudo (superuser do) is a program for Unix-like operating systems that allows users to run programs with the security privileges of another user, typically the superuser (root). It provides controlled privilege escalation with logging.

Sudo vs Su

  • Sudo: Uses user's password, single command scope, configurable permissions
  • Su: Uses target user's password, full shell session, all-or-nothing

Sudoers Configuration

The /etc/sudoers file defines who can use sudo, what commands they can run, and whether a password is required.

Common Misconceptions

  • "Sudo equals root" - Provides controlled access, not full root
  • "NOPASSWD is convenient" - Security risk, avoid when possible
  • "Sudo logs are automatic" - Requires proper configuration