Question 520
A Linux learner encounters the following situation: A Linux learner uses su without understanding why the resulting identity and environment may differ from a normal user session. Which observation would BEST verify that the problem was resolved?
Explanation
Correct Answer
id shows the intended effective user in the switched session and restores the prior identity after exit. This is specific evidence for the stated requirement. The explanation is: su starts a shell or command under another user account when authentication and policy allow it. The required action is: Use su appropriately to switch user identity, and distinguish it from running one command through sudo.
Incorrect Answers
That observation would verify a different mechanism: Password hashes are commonly separated from generally readable account metadata for access protection. It would not establish whether the present failure was corrected, because su starts a shell or command under another user account when authentication and policy allow it. Test “id shows the intended effective user in the switched session and restores the prior identity after exit” instead.
“A known prior login appears in the available history even after that session terminates” tests the technical condition: Login history is recorded separately from a snapshot of processes currently running. The current control has another acceptance boundary: Su starts a shell or command under another user account when authentication and policy allow it. Its direct evidence is “id shows the intended effective user in the switched session and restores the prior identity after exit”.
This test can succeed without resolving the cause described here. It addresses: System accounts can own files or run services without being intended for interactive login. The relevant causal dependency is: Su starts a shell or command under another user account when authentication and policy allow it. The required validation is “id shows the intended effective user in the switched session and restores the prior identity after exit”.