MCQ Practice

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?

A

password change fails since user does not have permission to update /etc/passwd file

B

password change is successful because the program runs as root

C

passwd change program runs in kernel mode where write access to the /etc/passwd file is possible

D

/etc/passwd is a special file and the system by default allows all users to update it

Correct Answer: B