Your message dated Thu, 4 Dec 2025 14:56:34 +0000
with message-id <[email protected]>
and subject line Re: Bug#743286: dynamic motd inconsistencies
has caused the Debian Bug report #821735,
regarding dynamic motd inconsistencies
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
821735: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821735
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libpam-modules
Version: 1.1.3-7.1

libpam-modules contains pam_motd, which should disaplay a motd and
update it dynamically.

The man page states, that there is an option noupdate to disable
updating the motd, otherwise it is updated. By default /etc/pam.d/sshd
contains lines like

session optional pam_motd.so motd=/run/motd.dynamic noupdate
session optional pam_motd.so

The last entry makes pam_motd.so show /etc/motd - and makes it also
update a third motd file (that is not mentioned anywhere except in the
source code): /var/run/motd

The latter path is hardcoded here:
http://patch-tracker.debian.org/patch/series/view/pam/1.1.1-6.1+squeeze1/update-motd

Also /run/motd.dynamic is updated by a init.d script, that only writes
the output of uname into it, ignoring scripts in /etc/update-motd.d,
that are used by pam_motd.so to update /var/run/motd.

This is not a clean design and badly documented. Therefore I propose the
following changes:

1) Make the motd init script use /etc/update-motd.d and the uname
command to a script there

2) Fix pam_motd.so to update the motd file given in the motd option
instead of always /var/run/motd

3) Change the sshd pam config to:

session optional pam_motd.so motd=/run/motd.dynamic
session optional pam_motd.so noupdate

-> This will first show the dynamic motd and update it if required. Then
it will show /etc/motd, that can contain static contents.

--- End Message ---
--- Begin Message ---
Source: openssh
Source-Version: 1:6.6p1-7

Regarding the OpenSSH side of this bug:

On Tue, Apr 01, 2014 at 01:23:42PM +0200, Till Maas wrote:
The man page states, that there is an option noupdate to disable
updating the motd, otherwise it is updated. By default /etc/pam.d/sshd
contains lines like

session optional pam_motd.so motd=/run/motd.dynamic noupdate
session optional pam_motd.so
[...]
3) Change the sshd pam config to:

session optional pam_motd.so motd=/run/motd.dynamic
session optional pam_motd.so noupdate

-> This will first show the dynamic motd and update it if required. Then
it will show /etc/motd, that can contain static contents.

This seems to have been covered by https://bugs.debian.org/757059, and as such was fixed in version 1:6.6p1-7, which was part of Debian 8 (jessie). Sorry for taking so long to remember to close this bug as well.

--
Colin Watson (he/him)                              [[email protected]]

--- End Message ---

Reply via email to