XK0-005 · Question #872
Which of the following best explains why the SUID permission is set on the file? /bin/passwd
The correct answer is A. To allow normal users to update the /etc/shadow file. The Set User ID (SUID) permission allows a file to execute with the privileges of the file owner, rather than the user who runs it. The /bin/passwd command is used by users to change their own passwords. The actual password hashes are stored in /etc/shadow, which is only…
Question
Options
- ATo allow normal users to update the /etc/shadow file
- BTo ensure group permission on the file stay up to date
- CTo indicate an attacker has compromised the system
- DTo mark the file as immutable
How the community answered
(40 responses)- A95% (38)
- C3% (1)
- D3% (1)
Explanation
The Set User ID (SUID) permission allows a file to execute with the privileges of the file owner, rather than the user who runs it. The /bin/passwd command is used by users to change their own passwords. The actual password hashes are stored in /etc/shadow, which is only writable by the root user. Since normal users do not have direct write permissions on /etc/shadow, the SUID bit on /bin/passwd enables the command to run with root privileges, allowing password changes.
Topics
Community Discussion
No community discussion yet for this question.