> BTW ntpdate is deprecated and is to be removed from the ntp packeage. > see man ntpdate, viz:
I would treat this as hot air, ntpd -q is simply no replacement for ntpdate. With ntpdate, I can get the time without having to set the system time to the time I got. As non-root: > ntpdate -q time.paradise.net.nz server 203.96.152.12, stratum 2, offset -0.007171, delay 0.03726 6 Oct 12:33:37 ntpdate[7044]: adjust time server 203.96.152.12 offset -0.007171 sec > ntpd -q time.paradise.net.nz Exit 1 Oops bummer. I'll be *(&@*(# off if they remove ntpdate. As root, I'll still be interested in knowing first how much the system time is off before I decide whether I force-load a new time. Back to the original question, Nick is probably right with his suggestion of the cron environment not allowing ntpdate to be run. It's not a problem with cron however, it's an important security measure to clear out the environment before running programs, especially when doing so as root. You're free to set any environment variables in the crontab file itself. Commands are run by cron within the environment provided by cron, not within your shell envirnment (good thing too). To see what your cron environment is, Use this in a crontab: * * * * * /usr/bin/env | /usr/bin/sort >/tmp/env Most likely you'll find that your ntpdate isn't in your cron's PATH. Volker -- Volker Kuhlmann is possibly list0570 with the domain in header http://volker.dnsalias.net/ Please do not CC list postings to me.
