Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

motd printed twice

Status
Not open for further replies.

MrTom

Programmer
Mar 13, 2001
383
GB
everytime i login via ssh my one box prints the motd twice (and prints the last login details twice too).

which process controls this? i'd like to trace it if possible.

thanks.
 
On most unix flavours (not sure about linux) the motd file is read from the file /etc/profile which is executed whenever you login.
 
the profile doesn't print the motd but maybe there's a similar file that is doing this.
i know that the profile is only being called once as if i echo something in there i only see it once (after the 2 motds)
 
I managed to get access to a RedHat Linux box and the man pages have no reference to 'motd' However the man page for login suggest that it is the login binary which displays the last login.

On other unix servers which do have an motd file, this is read by /etc/profile for sh or ksh users and by /etc/cshrc bu csh users.

Maybe your login man page may help.
 
found this in my sshd_config

#UseLogin no

and my /etc/pam.d/ssh prints the motd too.

i uncommented the former and restarted ssh and everything works fine now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top