Bug 2112001
| Summary: | cron should not be using pam_systemd, leading to CRED failed in audit | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Welterlen Benoit <bwelterl> |
| Component: | systemd | Assignee: | Michal Sekletar <msekleta> |
| Status: | CLOSED MIGRATED | QA Contact: | Frantisek Sumsal <fsumsal> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 9.0 | CC: | brian, bwelterl, jstanek, lionel.cons, msekleta, opohorel, pbrezina, qguo, rhel-cs-apps-subsystem-qe, systemd-maint-list |
| Target Milestone: | rc | Keywords: | MigratedToJIRA |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 2053750 | Environment: | |
| Last Closed: | 2023-09-21 11:52:52 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: | 2053750 | ||
| Bug Blocks: | |||
|
Description
Welterlen Benoit
2022-07-28 15:15:52 UTC
I guess your proposal would be to change system-auth. More specifically to move the following one line above: session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid From: session optional pam_keyinit.so revoke session required pam_limits.so -session optional pam_systemd.so session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid session required pam_unix.so To: session optional pam_keyinit.so revoke session required pam_limits.so session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid -session optional pam_systemd.so session required pam_unix.so My proposal is to not use pam_systemd in case of crond, thus add "session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid" before "-session optional pam_systemd.so" This line is currently before "session required pam_unix.so" I don't know if pam_unix is required in case of crond or not ... Tx I would like to hear opinions from systemd developers. It sounds like pam_systemd shouldn't be run for session of automated services, but perhaps this is something to implement directly in pam_systemd? Iker will check. Michal do you think it would be possible to bypass services requests in pam_systemd? They wouldn't need to run all the pam_systemd workflow and we would avoid all this noise. Hello, if pam_systemd.so is invoked as part of the session setup then generally speaking users get two main "side effects". First is associated .scope unit and ability to do resource management of this session through systemd and second is systemd --user instance for the user (if it isn't running yet). We want to introduce ability to avoid starting the --user instance for some sessions (e.g. cron sessions). Couple months ago I've posted the PR to add this https://github.com/systemd/systemd/pull/23569 however latter we reverted the change because Lennart had some reservations regarding the overall design. Since then I haven't spent more time on this but this BZ is a good reminder I need to get back to it. Thanks for the information. It seems like this bugzilla belongs to systemd, so I'm assigning it to you. I hope it helps you drive this effort forward. Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug. This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there. Due to differences in account names between systems, some fields were not replicated. Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information. To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer. You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like: "Bugzilla Bug" = 1234567 In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information. |