Fedora Linux default pam_motd configuration don’t show content of motd_dir at starting session (except for ssh)

By default, Fedora Linux displays all motd messages (including the motd file and the motd.d directory) in connection with ssh, but in other cases when opening a session (TTY) only the motd file without the motd.d directory. Where is this configured to work like this? And why is it configured like this?


This topic is moved from here.

Okay, I have some progress here. By default, pam_motd on Fedora Linux is configured to start only for ssh logins (see /etc/pam.d/sshd and /etc/pam.d/login). However, by default the message of motd file (while motd_dir is not) is displayed at TTY login. Well, I tried to configure the login as intended by pam (i.e. /etc/pam.d/login). After that, the pam_motd.so pam module displays the motd file and the motd_dir directory correctly. However, then the login looks like this:

fedora login: user
Passwrod: 
content of motd file
content of motd_dir files
Last login: Tue Nov 1 bla bla
content of motd file

The clip printed before the last log entry is from pam_motd. The latter is apparently some other program that reads and prints the motd file. What program does this? Why doesn’t Fedora Linux use pam_motd? This is confusing and stypid…


This comment is moved from here.

What I have noted is that for single user (home) use it is wasted to have the motd displayed since that one user is usually the admin and displaying it every time they log in to the TTY is wasted. Also, the motd is only related to a text display and very seldom does the regular user ever use the tty but instead is using the gui desktop where motd is not used.

A user logging in via ssh, OTOH, is using a virtual tty so the motd should display there.

A multi-user system often has more than one user logged in at the same time, most with only the tty screen, so the motd is relevant for them.

Sorry, I didn’t ask that.