Cron Daemon: /bin/sh: ntpdate: command not found

Issues related to applications and software problems
Post Reply
usja
Posts: 4
Joined: 2015/04/01 13:39:44

Cron Daemon: /bin/sh: ntpdate: command not found

Post by usja » 2015/04/17 06:08:54

Every 10 minutes i recieve this message on e-mail:
Subject: Cron <root@server> ntpdate 0.ua.pool.ntp.org
/bin/sh: ntpdate: command not found

i've tried:
- remove and install ntp, ntpdate – no result
- in /etc/crontab – no taska
when i try run ntpdate under sh:

Code: Select all

sh-4.1# ntpdate 0.ua.pool.ntp.org
17 Apr 09:10:09 ntpdate[15295]: adjust time server 193.27.209.211 offset -0.000642 sec

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Cron Daemon: /bin/sh: ntpdate: command not found

Post by avij » 2015/04/17 07:33:15

Don't run ntpdate from cron, configure and use ntpd instead.

If you run crontab -l as root, you'll probably see the command. Remove it, for example with crontab -e. The reason why the ntpdate command is not found is probably related to path settings. You would need to specify the full path /usr/sbin/ntpdate in the cron command, if you wanted to use ntpdate.

usja
Posts: 4
Joined: 2015/04/01 13:39:44

Re: Cron Daemon: /bin/sh: ntpdate: command not found

Post by usja » 2015/04/17 07:52:23

thx for reply.
i haven't add any tasks to crontab.

Code: Select all

[root@server ~]# crontab -l
no crontab for root

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cron Daemon: /bin/sh: ntpdate: command not found

Post by TrevorH » 2015/04/17 09:34:49

It's obviously running it from somewhere! Check in the various /etc/cron* directories and see if there is an entry in one of those, most likely is a file in /etc/cron.d/
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply