Bug 2014458
| Summary: | Please backport checking multiple motd_pam paths from 1.4.0 to RHEL 8 | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Jose <jnoguera> |
| Component: | pam | Assignee: | Iker Pedrosa <ipedrosa> |
| Status: | CLOSED ERRATA | QA Contact: | Anuj Borah <aborah> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.4 | CC: | aborah, minl, pbrezina, perobins, shshang, wshi, xiliang, yacao |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | pam-1.3.1-19.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-11-08 10:48:39 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 2088455 | ||
| Bug Blocks: | |||
|
Description
Jose
2021-10-15 09:44:33 UTC
I think that it would be enough to include https://github.com/linux-pam/linux-pam/commit/f9c9c72121eada731e010ab3620762bcf63db08f#diff-8cbd5642ddf07f4ddb1a7cc36599f7f96ec3a0cc765b647516a11f3a125df848 in RHEL8 to fix this problem. Can you provide more information, for example the reproduction steps, to check that we are on the same page? Hi Iker, Yes, I think that's the commit. The steps to reproduce are: - sudo dnf install -y greenboot greenboot-status - sudo systemctl enable greenboot-healthcheck greenboot-status greenboot-task-runner - sudo reboot - ssh into the machine, check MOTD. `Boot Status is GREEN - Health Check SUCCESS` should appear. - With pam-1.3.1-14.el8.x86_64, it doesn't work. With that commit backported, it should appear there. The boot message is written in `/run/motd.d/boot-status`. Let me know if you need anything else. Thanks! Hi, I want to update some information during my testing,I met the error in journalctl about scanning directory /run/motd.d and /usr/lib/motd.d. Then I found this should be fixed in 1.3.1-19, so I download it for testing, but the error still there after reboot VM with the updated pam: Guest: RHEL-8.7.0-20220524.0 1. Found journalctl error in VM: # journalctl | grep error May 25 23:57:24 minl-VMscript-8.7 sshd[4505]: pam_motd(sshd:session): pam_motd: error scanning directory /run/motd.d May 25 23:57:24 minl-VMscript-8.7 sshd[4505]: pam_motd(sshd:session): pam_motd: error scanning directory /usr/lib/motd.d # rpm -qa pam pam-1.3.1-18.el8.x86_64 2. Found change log about pam, so upgrade pam to for testing: Changelog * Mon May 23 2022 Iker Pedrosa <ipedrosa> - 1.3.1-19 - Add the motd.d directories (empty) to silence warnings and to provide proper ownership for them. Resolves: #2014458 # rpm -U pam-1.3.1-19.el8.x86_64.rpm # rpm -qa pam pam-1.3.1-19.el8.x86_64 3. After upgratding pam, the directory be created: # ll /run/motd.d/ Total 0 # ll /usr/lib/motd.d/ Total 0 4. But after rebooting the VM, there is no directory of /run/motd.d # reboot # journalctl | grep error May 26 04:20:50 minl-VMscript-8.7 sshd[1441]: pam_motd(sshd:session): pam_motd: error scanning directory /run/motd.d # ll /run/motd.d ls: cannot access '/run/motd.d': No such file or directory # ll /usr/lib/motd.d/ Total 0 # rpm -qa pam pam-1.3.1-19.el8.x86_64 Expect: There should be /run/motd.d after rebooting VM Actual: There is no /run/motd.d after rebooting VM Well, this is quite normal since /run folder is recreated after every boot. Even if /run/motd.d folder would be recreated by PAM after every boot, which I'm not sure should be done, pam_motd wouldn't show any welcome message because that folder would be empty. If you want a welcome message to be shown even after a reboot I'd recommend you using other available folders (i.e. /etc/motd.d/). If you still would like to use /run/motd.d, reboot the machine and get a welcome message; then I guess that you should create a startup script to handle the creation of the aforementioned folder and the welcome message. (In reply to minl from comment #12) > Hi, I want to update some information during my testing,I met the error in > journalctl about scanning directory /run/motd.d and /usr/lib/motd.d. Then I > found this should be fixed in 1.3.1-19, so I download it for testing, but > the error still there after reboot VM with the updated pam: > > Guest: RHEL-8.7.0-20220524.0 > > 1. Found journalctl error in VM: > > # journalctl | grep error > May 25 23:57:24 minl-VMscript-8.7 sshd[4505]: pam_motd(sshd:session): > pam_motd: error scanning directory /run/motd.d > May 25 23:57:24 minl-VMscript-8.7 sshd[4505]: pam_motd(sshd:session): > pam_motd: error scanning directory /usr/lib/motd.d > > # rpm -qa pam > pam-1.3.1-18.el8.x86_64 > > 2. Found change log about pam, so upgrade pam to for testing: > > Changelog * Mon May 23 2022 Iker Pedrosa <ipedrosa> - 1.3.1-19 > - Add the motd.d directories (empty) to silence warnings and to > provide proper ownership for them. Resolves: #2014458 > > # rpm -U pam-1.3.1-19.el8.x86_64.rpm > > # rpm -qa pam > pam-1.3.1-19.el8.x86_64 > > 3. After upgratding pam, the directory be created: > > # ll /run/motd.d/ > Total 0 > # ll /usr/lib/motd.d/ > Total 0 > > 4. But after rebooting the VM, there is no directory of /run/motd.d > > # reboot > > # journalctl | grep error > May 26 04:20:50 minl-VMscript-8.7 sshd[1441]: pam_motd(sshd:session): > pam_motd: error scanning directory /run/motd.d > > # ll /run/motd.d > ls: cannot access '/run/motd.d': No such file or directory > # ll /usr/lib/motd.d/ > Total 0 > # rpm -qa pam > pam-1.3.1-19.el8.x86_64 > > Expect: > There should be /run/motd.d after rebooting VM > Actual: > There is no /run/motd.d after rebooting VM One more update, there is no journalctl error against RHEL 8.6 (pam-1.3.1-16.el8.x86_64) while there is no such directory /run/motd.d and /usr/lib/motd.d Guest:RHEL-8.6.0-20220420.d.0 # rpm -qa pam pam-1.3.1-16.el8.x86_64 # journalctl | grep error # journalctl | grep pam May 26 08:05:41 minl-disk-8.6-0420 systemd[4856]: pam_unix(systemd-user:session): session opened for user root by (uid=0) May 26 08:05:41 minl-disk-8.6-0420 sshd[4850]: pam_unix(sshd:session): session opened for user root by (uid=0) # ll /run/motd.d ls: cannot access '/run/motd.d': No such file or directory # ll /usr/lib/motd.d ls: cannot access '/usr/lib/motd.d': No such file or directory Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (pam bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:7723 |