A portable fast MOTD similar to Ubuntu's.
A portable fast MOTD similar to Ubuntu's.
Long story short:
motd.sh
to /etc
./etc/pam.d/system-login
:-session optional pam_motd.so motd=/etc/motd
+session optional pam_exec.so stdout /etc/motd.sh
motd.sh
to /etc
./etc/pam.d/login
and /etc/pam.d/sshd
:-session optional pam_motd.so motd=/run/motd.dynamic
+session optional pam_exec.so stdout /etc/motd.sh
Edit /etc/pam.d/login
and /etc/pam.d/sshd
-session optional pam_motd.so noupdate
motd.sh
to /etc
.~/.config/fish/config.fish
:if [ xterm != "dumb" ]
bash /etc/motd.sh; or echo "Failed to show MOTD."
end
If you don't like scripts in /etc
, feel free to choose any other location.