With some recent changes, Gentoo now seems to print the message of the day (MOTD) twice, when logging in using SSH:
Last login: Mon Dec 29 04:45:22 UTC 2008 from box on ssh
(message of the day)
Last login: Mon Dec 29 22:55:09 2008 from box
(message of the day)
I tried the following solution
Looks like the answer was in the /etc/pam.d/login and /etc/pam.d/system-login files. I had to comment out the pam_motd.so lines.
as described on http://stackoverflow.com/questions/190912/etcmotd-printing-twice-on-gentoo-linux. With these quick fixes, the MOTD doesn’t get printed twice anymore.
In addition, I also had to comment out the
session optional pam_lastlog.so
lines in /etc/pam.d/login and /etc/pam.d/system-login in order to prevent the “last login” line from being printed twice.