According to man page
"PAM Access Control: On Red Hat systems, crond now supports access control with PAM - see pam(8). A PAM configuration file for crond is installed in /etc/pam.d/crond. crond loads the PAM environment from the pam_env module, but these can be overriden by settings in the crontab file."
Standard installation :
/etc/security/pam_env.conf is empty (only comments)
/etc/environment is empty
But for running task :
So I think value should be taken from /etc/crontab.
What did I miss ?
I suppose that you're editing either user's crontab with crontab -e or some crontab in /etc/cron.d/ directory. Each crontab is individual and the environment variables specified in that crontab apply only to that crontab.
No, it's a /etc/cron.hourly script (provided by ocsinventory-agent rpm, which need /sbin in path).
Where is defined the defaut environment for it ?
- Previously, hourly task where launch by "run-parts" in /etc/crontab, so use the env. defined there
- It seems it is now launched by /etc/cron.d/0hourly where there is no env. defined
This seems to explain the difference between F10/F11 which can be consider as a "regresion".
I don't have done any test for daily/monthly script, but it could be a solution to add same env. in /etc/cron.d/0hourly that in /etc/crontab to keep same behaviour than in previous release.
Yes, that's a good idea.
The cron man page will be updated and cron jobs in anacron package has environment values now.
anacron-2.3-75.fc11 has been submitted as an update for Fedora 11.
anacron-2.3-75.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.