Bug 587345
Summary: | pam_env cannot change PATH for a cronjob | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Martin Poole <mpoole> |
Component: | vixie-cron | Assignee: | Marcela Mašláňová <mmaslano> |
Status: | CLOSED INSUFFICIENT_DATA | QA Contact: | qe-baseos-daemons |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 5.5 | CC: | ktoyama |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-09-14 11:37:22 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Martin Poole
2010-04-29 16:29:42 UTC
For example, from cron(5) man pages (Debian): On the Debian GNU/Linux system, cron supports the pam_env module, and loads the environment specified by /etc/security/pam_env.conf. How-ever, the PAM setting do NOT override the settings described above nor any settings in the crontab file itself. Note in particular that if you want a PATH other than "/usr/bin:/bin", you will need to set it in the crontab file. For clarity the following is my analysis of the current environment generation. For each crontab file it builds a default list of environment variables similar to the following. SHELL=/bin/sh HOME=/home/testuser PATH=/usr/bin:/bin It then overlays any environment variables declared in the source crontab file and then sets the two explicit values. LOGNAME=testuser USER=testuser When it comes to running a specific job from a particular crontab file it calls the routine to read the pam environment, it then overlays the environment list built for the crontab above, and then when it finally execs the requested binary it provides this environment for the command. This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. I'm not sure if this bug is only about documentation and if it is, what should be changed there. The problem might be fixed by errata for bug #541189. Feel free to re-open this bug report if you are not satisfied with current release. |