/etc/environment and cron

Posted by clorz on Super User See other posts from Super User or by clorz
Published on 2010-06-04T15:54:19Z Indexed on 2012/04/08 11:35 UTC
Read the original article Hit count: 178

I've got two machines: Fedora and CentOS. And a cronjob

0-59 * * * * env > /home/me/env.log

On CentOS I can see that /etc/environment is affecting the output while on Fedora it does not. I want Fedora to be like CentOS. What do I need to make it happen?

/etc/pam.d/crond on Fedora

auth      sufficient pam_rootok.so
auth       required   pam_env.so
auth       include    system-auth
account    required   pam_access.so
account    include    system-auth
session    required   pam_loginuid.so
session    include    system-auth

/etc/pam.d/crond on CentOS

auth      sufficient  pam_env.so
auth       required   pam_rootok.so
auth       include    system-auth
account    required   pam_access.so
account    include    system-auth
session    required   pam_loginuid.so
session    include    system-auth

/etc/security/pam_env.conf is the same on both systems and consists of commented out lines. Even if I make /etc/pam.d/cron.d files the same, problem still persists.

© Super User or respective owner

Related posts about fedora

Related posts about centos