A security team is reviewing login banners on a Linux server. When is the text in /etc/motd shown to a user?
Show the answer
Correct answerA. After a successful login, before the shell prompt appears
AWhy this is right: motd is the message of the day, printed only after authentication succeeds and before the shell starts.
BWhy not this: The pre-login console text comes from /etc/issue; motd appears only after login.
CWhy not this: A pre-authentication SSH banner comes from the sshd Banner setting, often /etc/issue.net, not from motd.
DWhy not this: motd is shown at login, not each time a non-login shell such as a new terminal tab starts.
/etc/motd is the message of the day, shown once login succeeds. The pre-login warning for local consoles comes from /etc/issue, and for network logins from /etc/issue.net or the sshd Banner setting, so treating motd as a pre-authentication banner is the common mistake.