mediumStudy question · answer published in Linux interview questions, so no pointslinuxpermissionssecurity
How passwd edits a root-owned file
A normal user runs passwd and it updates /etc/shadow, which only root can write. Why does this work?
$ ls -l /usr/bin/passwd -rwsr-xr-x 1 root root 59976 /usr/bin/passwd
Discussion 0
Join free to post in the discussion.
Related questions
- Reading logs of a systemd serviceSite Reliability Engineer
- Who is using port 8080?Site Reliability Engineer
- A process vanished overnightSite Reliability Engineer
- Hard link after deleting the originalSite Reliability Engineer
- The t at the end of /tmpSite Reliability Engineer
- Mode of a new file with umask 022Site Reliability Engineer
- Hiding error messages of a commandSite Reliability Engineer
- Process state Z in psSite Reliability Engineer