Hello Thomas,
Thanks for reporting this and making Ubuntu better.
about your statement on lsb-release, in 00-header:
""""
[ -r /etc/lsb-release ] && . /etc/lsb-release
if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then
# Fall back to using the very slow lsb_release utility
DISTRIB_DESCRIPTION=$(lsb_release -s -d)
fi
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.7 LTS"
""""
the slowpath is only executed if the DISTRIB_DESCRIPTION variable is not
set, at least in my tests.
In regards to your statement:
"""
The content of /etc/update-motd.d/* really, really, really shouldn't be
executed if the session in question is not interactive, as it provides no value
at all. Unfortunately, to disable it for these non-interactive sessions, we
also have to disable it for the interactive ones as well where it has some
value (though not enough to make spiking the load on this server through the
roof an acceptable tradeoff).
"""
Considering there IS a way of disabling the dynamic motd contents
currently by commenting only the line containing the /run/motd.dynamic
wording:
# Print the message of the day upon successful login.
# This includes a dynamically generated part from /run/motd.dynamic
# and a static (admin-editable) part from /etc/motd.
# session optional pam_motd.so motd=/run/motd.dynamic
session optional pam_motd.so noupdate
I'm flagging this bug as a whishlist priority.
** Also affects: update-motd (Ubuntu)
Importance: Undecided
Status: New
** No longer affects: openssh (Ubuntu)
** No longer affects: base-files (Ubuntu)
** Changed in: update-motd (Ubuntu)
Status: New => Triaged
** Changed in: update-motd (Ubuntu)
Importance: Undecided => Wishlist
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1893716
Title:
scripts in /etc/update-motd.d/ run even on login via non-interactive
scp and sftp sessions
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-motd/+bug/1893716/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs