On Debian 13 how to `wall` such that *Debian GNU/Linux 13 debian tty1* *debian login:* password prompt also sees it?
Aug 7, 12:37am
On Debian (and most Linux systems), the wall command sends a message to all logged-in users. However, by default, it does not display messages on the login prompts (like the tty1 console or getty sessions) because those are not considered "logged-in" sessions.
To ensure your wall message also appears on the login prompts (e.g., Debian GNU/Linux 13 debian tty1 and the login:/password: prompts), you need to configure the system to allow messages to be sent to all terminals, including those managed by getty or agetty.
Solution: Use mesg and wall with tty Broadcast
Enable messages on all TTYs:
By default, some TTYs (like /dev/tty1) may have message reception disabled. You can enable it with:
bash
sudo mesg y /dev/tty*
This allows all TTYs to receive broadcast messages.
Send the message with wall:
Use the wall command as usual:
bash
echo "Your message here" | wall
This will now also appear on the login prompts if mesg is enabled.
Alternative: Use pam_wall (PAM Module)
If you want login prompts to always show system messages (e.g., for maintenance notifications), you can configure PAM (Pluggable Authentication Modules) to display a custom message before login.
Edit the PAM configuration:
Open /etc/pam.d/login and add:
text
session optional pam_wall.so
This will display the contents of /etc/issue (or a custom file) before the login prompt.
Edit /etc/issue:
Add your message to /etc/issue (e.g., echo "System maintenance at 2 AM" | sudo tee /etc/issue).
Restart getty:
Restart the console service (e.g., systemctl restart getty@tty1).
Temporary Workaround: Write Directly to TTY
If you want to send a message immediately to all TTYs (including login prompts), you can write directly to each TTY device:
bash
echo "Your message here" | sudo tee /dev/tty*
This forces the message to appear on all active TTYs, including login prompts.
Which Method to Use?
For one-time messages, use mesg y /dev/tty* + wall.
For persistent login messages, use pam_wall + /etc/issue.
For immediate broadcast, use tee /dev/tty*.
Aug 7, 12:37am
This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.