161k views
2 votes
The ls -l output for /etc/passwd and /usr/bin/passwd is as follows: -rw-rw-r– 1 root root 2807 Apr 26 13:50 /etc/passwd -r-s–x–x 1 root root 17008 May 25 02:30 /usr/bin/passwd If a user, not belonging to the group 'root', runs the passwd executable in an attempt to modify his password, then which of the following is true?

1) password change fails since user does not have permission to update /etc/passwd file
2) password change is successful because the program runs as root
3) passwd change program runs in kernel mode where write access to the /etc/passwd file is possible

User Chillworld
by
8.1k points

1 Answer

6 votes

Final answer:

The true statement is that ``password change fails since user does not have permission to update /etc/ passwd file``

The correct answer is option ⇒1

Step-by-step explanation:

When a user who does not belong to the group 'root' runs the passwd executable to change their password, the change fails due to insufficient permissions. In the ls -l output, the /etc/ passwd file has permissions -rw-rw-r–, which means that only the owner and group have write permission.

Since the user does not belong to the 'root' group, they do not have the required write access to update the file.

The correct answer is option ⇒1

User Eta
by
8.0k points