motd appears twice
When i login motd file apears twice
Anyway how to trace that? What configuration mistake :o can cause this behavior? |
One possibility is that motd is run from /etc/profile and .profile in your home directory. Compare the content of both files and see if either of them calls motd. You should also look at .bashrc and .bash_profile if they exist.
|
Quote:
no reference to motd :( |
OK, I was shooting from the hip and missed. I've looked at motd's man page now, and I see that /etc/motd is displayed by login "after a successful login but just before it executes the login shell."
What do you get when you do a `cat /etc/motd`? It is possible that the file carries the same message twice. (Hey, it could happen...) What happens when you put a zero-length file called .hushlogin in your login directory? (In your home directory, do a `touch .hushlogin`.) |
Quote:
Quote:
|
Hey, it was worth a shot. :)
It seems to me there are two other possibilities. Login is reading /etc/motd twice, or login is being run twice. Either way, I'm stumped. I will be interested to see what answer you find. |
Hmm, what happens if you do a "grep -r motd /*" or something along those lines to see if there's a config or startup file somewhere that might be calling it. I assume if that existed it would be in one of the places you've already looked, but it's always worth a shot to double-check everywhere.
|
Quote:
now: Quote:
How can i restart login service / pam.d or something to apply changes to these files? |
I'd say comment out one of those sections and restart, but I don't know what pam is so I'll let someone else give a more informed comment.
|
pam is a sum of libraries that set the way a user will login/authenticate to the system.
any other way to restart the service without rebooting? (i dont want to restart! uptime is bliss ;) ) |
You could look for the process (if it works that way) and kill and restart it, or try all the varieties of "foo/pam.d start/stop"
|
I marked as remark (nice expression :>)
in /etc/pam.d/ssh # Print the message of the day upon successful login. #session optional pam_motd.so # [1] I restarted the service using "/etc/init.d/inetd restart" now everything works fine! thx a lot |
I was close :)
Glad you got it fixed. |
All times are GMT -5. The time now is 05:26 PM. |