setuid root

0001-01-01

Linux and Unix-like operations have a filesystem flag that allows users to run an executable under the user context of the file’s owner.

The setuid bit can be set using the chmod command: chmod +s /path/to/file ### sets setuid bit chmod -s /path/to/file ### removes setuid bit

Some programs such as passwd are configured setuid root because they ultimately need to access and modify the passwd and shadow files, which are owned by the root user.

Leveraging vulnerabilities in setuid root (or any other user such as mail) programs is a popular method of privilege escalation.