nerdexam
CompTIACompTIA

XK0-005 · Question #872

XK0-005 Question #872: Real Exam Question with Answer & Explanation

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 writable

System Management

Question

Which of the following best explains why the SUID permission is set on the file? /bin/passwd

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

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

#Linux Permissions#SUID#File System Security#System Utilities

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions