FS#72707 - [pambase] Set motd_dir for /etc/mot.d includes

Attached to Project: Arch Linux
Opened by Jelle van der Waa (jelly) - Thursday, 11 November 2021, 07:40 GMT
Last edited by Jelle van der Waa (jelly) - Friday, 12 November 2021, 19:45 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

When having a package provide a custom motd message in /etc/motd.d this is not shown when logging in via ssh.

Reading `man pam_motd` shows the syntax is as following

pam_motd.so [motd=/path/filename] [motd_dir=/path/dirname.d]

We set:

session optional pam_motd.so motd=/etc/motd

As we set motd, /etc/motd.d is ignored as noted in the man page

When no options are given, the default behavior applies for both
options. Specifying either option (or both) will disable the
default behavior for both options.

Setting

session optional pam_motd.so motd=/etc/motd motd_dir=/etc/motd.d

Fixes the issue.
This task depends upon

Closed by  Jelle van der Waa (jelly)
Friday, 12 November 2021, 19:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  pambase-20211111-1-any.pkg.tar.zst
Comment by nl6720 (nl6720) - Thursday, 11 November 2021, 07:59 GMT
Wouldn't it be better to simply remove motd=/etc/motd, so that the defaults (which include motd files in /run and /usr/lib) would get used?
Comment by Jelle van der Waa (jelly) - Thursday, 11 November 2021, 11:35 GMT
That's also fine with me, and less customatiozation.

Loading...