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?
-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/passwdA. 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
Answer: Option B
Related Questions on Linux
What command is used to count the total number of lines, words, and characters contained in a file?
A. countw
B. wcount
C. wc
D. count p
E. None of the above
What command is used with vi editor to delete a single character?
A. x
B. y
C. a
D. z
E. None of the above

Join The Discussion