A Linux administrator needs to present a standard legal disclaimer to all users immediately after they successfully authenticate via a terminal or SSH session. The message must be displayed automatically on every login before the shell prompt appears. Which file is the most appropriate for this task?
The correct answer is /etc/motd. The /etc/motd (Message Of The Day) file is specifically designed to display a message to all users after a successful login but before their shell prompt is presented. The contents of /etc/issue and /etc/issue.net are displayed before the login prompt, making them suitable for pre-login warnings but not for post-authentication messages. /etc/profile is a script that is executed for login shells to configure the user's environment; while it can be used to display messages, /etc/motd is the standard and designated file for this specific purpose.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the /etc/motd file?
Open an interactive chat with Bash
How is /etc/issue different from /etc/motd?
Open an interactive chat with Bash
Can the /etc/profile file be used to display messages like /etc/motd?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access