Weird... I ran the same test on an unprivileged user and got that user's full environment...
Greg -----Original Message----- From: Doug Weimer [mailto:[EMAIL PROTECTED] Sent: Monday, September 22, 2003 12:38 AM To: [EMAIL PROTECTED] Subject: RE: [gentoo-user] cron environment On Sun, 2003-09-21 at 20:48, Gregory Symons wrote: > I believe it gets the full environment the the user has; i.e. when it > launches the shell, the shell does its normal initialization and > sources the global environment and whatever the user has in his > .profile/.bashrc/.<insert init file here>. The man page isn't too > clear on this point (according to it, the only environment that gets > set is SHELL, LOGNAME, HOME and MAILTO, along with any environment set > in the user's crontab itself), so if someone knows better than me, > feel free to correct me. I just ran a quick test to see: /etc/crontab entry: */1 * * * * root /bin/mycrontest /bin/mycrontest: #!/bin/bash echo "*Environment:" env results: *Environment: SHELL=/bin/sh PATH=/usr/bin:/bin PWD=/root HOME=/root SHLVL=2 LOGNAME=root _=/usr/bin/env No settings were set from ~/.profile or /etc/profile. I ran a similar test with the 'set' command and it did not have anything beyond the typical shell/user information. I'm not sure where vcron is getting PATH or SHELL though, defaults compiled in perhaps? Doug
smime.p7s
Description: S/MIME cryptographic signature
