Bugzilla – Bug 1133929
[etc cleanup] move motd to /usr
Last modified: 2023-07-04 07:13:46 UTC
login has built in defaults for finding motd in /etc/motd and /usr/share/misc/motd so remove the explicit setting from /etc/login.defs and move the file to /usr
login from util-linux has that fallback. login from shadow doesn't and pam_motd neither. Both are not used by default in our distro so doesn't matter.
pam_motd has even more options: /etc/motd /run/motd /usr/lib/motd /etc/motd.d/ /run/motd.d/ /usr/lib/motd.d/
Regarding SR#700054: Are you aware of the current discussion and changes at https://bugzilla.suse.com/show_bug.cgi?id=1121197 ? I think they plan to update shadow-login_defs.patch soon too.
no. I ran into motd coincidentally
I like this, as it fits perfectly well with https://github.com/thkukuk/atomic-updates_and_etc/blob/master/README.md It should be no problem to enhance pam_motd to use /usr/share/misc/motd, too, and we should do that: else ssh e.g. could not display the file.
I am now working on an update that involves login.defs change. Do you want to backport this change to SLE15 *, SLE12 *?
/usr/lib/modprobe.d/
openSUSE-release is currently (20210718) removing /etc/motd created by sysadmin, not nice, even though saved as motd.rpmsave.
(In reply to Felix Miata from comment #11) > openSUSE-release is currently (20210718) removing /etc/motd created by > sysadmin, not nice, even though saved as motd.rpmsave. This is how RPM works, and this is why you have to check after every update for *.rpmsave and *.rpmnew files and merge your changes and the distribution changes manually. With the default RPM behavior, there is no way to avoid that. So with every change to the motd file you had to merge your changes again. To avoid this and make the update in the future easier, we split the distribution changes from the admin made changes. So last time for you to check for this files and merge manually.
Thorsten Kukuk: Yes, it is how rpm works. But if /etc/motd.rpmsave is created by rpm, then the motd was modified by sysadmin. (Otherwise it would be silently deleted.) As in this particular case, there is nothing to merge manually, and "Have a lot of fun..." did not change for a long time, I propose to add to the release spec file: %posttrans # /etc/motd was modified by sysadmin. Keep it as it is. if test -f /etc/motd.rpmsave ; then mv /etc/motd.rpmsave /etc/motd fi