Motd

In which login startup script is the motd displayed?

Red Hat 4AS

As I understand it, upon login (bash) it hits

/etc/profile
~/.bash_profile
~/.bash_login
~/.profile

I went through the scripts and the associated scripts (/etc/profile.d/*.sh) but don't see where it's being displayed from.

I also checked /etc/ssh/sshd_config and PrintMotd is yes.

The problem is logging in as a user displays the motd correctly however logging in as root does not. Logging in as root to a different server (similar setup) does show root the motd.

And I know about not logging in a root. I haven't done it and wouldn't have known about the problem had it not been brought up by auditors. Since it's a customer server, we're not allowed to "fix" it.

Thanks.

Carl

the contents of /etc/motd are displayed by the login binary:

[root@UW-GOODRICHWE ~]# strings -f /bin/login | grep motd
/bin/login: /etc/motd

So what would prevent a root login from displaying the motd if my login works vs the motd working on both roots and my account on a similarly configured server?

I would expect perhaps a flag file (like .dircolors) but nothing jumps out in root's home dir or in the other three as not existing.

Carl

Check for a file called .hushlogin in root's home directory.

Shoot, good call. I'll check it tomorrow. Thanks.

Carl

That was it. Thanks. I've used .dircolors to disable aliases and colored output and recall reading about .hushlogin but haven't used it before.

Carl