Bogus ntpd does not respect Date & Time s…
apple Verified ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
/usr/sbin/ntpd regularly connect to time.apple.com even tho the "Set date and time automatically" is disabled in the System Preferences panel. It performed 3 time resets within the last 24 hours alone.
I would very much like to know why...
Thanks you very much in advance.
signed, Andrew from Canada
13 replies
Sign in or join Beachball Help to reply.
- 0
Virgule ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
oh my.. the Date & Time panel does not even use ntpd. It use ntpdate.
Is there anything left working as expected around here? :POriginal question remain: Why is ntpd doing it's thing many times per day even tho I disabled this function long ago?
- 0
R C-R ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Virgule wrote:
Original question remain: Why is ntpd doing it's thing many times per day even tho I disabled this function long ago?This is probably not really a topic best discussed in the Mac OS X v10.5 Leopard > Installation and Setup forum, but for starters, how specifically did you disable ntpd? Have you read the man pages for ntpd, ntpdate, & ntp.conf & checked or changed any associated files? Where specifically do you see indications that ntpd is "doing it's thing"?
- 0
Virgule ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I did my best to post in the most appropriate subforum. I found none to be particularly appropriate to my question. The "setup" word tipped my choice... Where would you have posted this?
I got that from a combination of Console (search query: ntpd) and some firewall logs digging...
[quote]
17/03/09 10:28:47 AM time reset +0.211413 s ntpd[540]
[/quote]ntpd did "it's thing" (time reset) 7 times so far on 17/03/09. I don't understand what is the point of giving me a checkbox to disable ntpd-whatever when the system is still going to do it anyway. vOv
MAN pages are unintelligible to me. They are obviously written in english, as all the words are clearly english, but they don't make any sense. At least I can't make sense of them. All alien technology to me :P
- 0
R C-R ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Virgule wrote:
I don't understand what is the point of giving me a checkbox to disable ntpd-whatever when the system is still going to do it anyway.The checkbox doesn't completely disable the Network Time Protocol (NTP) services built into the OS; it just gives you the option to set date & time manually. (ntpd is a utility
daemon.)If all this seems like alien technology, it is because it is quite complicated. However, the ultra-simplified version is that synchronization here applies to rate, not absolute time -- IOW, the daemon will set the computer's clock ahead or back a few seconds when necessary to correct for errors caused by it running slow or fast. This is desirable because the clocks in computers are not trimmed to the same accuracy as more conventional time pieces like wristwatches & most would soon become quite inaccurate without corrections.
If you still truly want to disable the NTP services in the OS for some reason, you probably should start a topic about it in the
Unix or another of the
Mac OS X Technologies forums. - 0
Virgule ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Alright then. I consider my question as answered.
There is obviously many things I have to learn. 😀
Thanks you very much for your time.
- 0
biovizier ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Hmm, I don't think what you are seeing is normal...
Checking or unchecking the "Set date & time automatically" should have the effect of loading or unloading the "org.ntp.ntpd" launch daemon with corresponding effects on the '
ntpd' process, with the configuration changes being written to the appropriate .plist file in "/System/Library/LaunchDaemons", and in "/private/etc/hostconfig" (the latter may be deprecated).It might be worthwhile to at least check these things to see if they change in response to changes to the checkbox...
Regarding '
ntpdate', I think that is only used to initially synchronize the clock when the "Set date & time"... setting is enabled, after which '
ntpd' maintains the time... - 0
Virgule ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Hi there. Thanks you for joining the fun. 🙂
I enabled and disabled the checkbox in Date & Time many times over while watching Console messages. I pasted the results bellow. It appears to have some issues. It can't reach the server, for one, and then SHAuthorizationRight something or something else.
I presume "launchd" = launch daemon
Are you able to make out something from this?17/03/09 6:34:50 PM (org.ntp.ntpd) Unknown key: SHAuthorizationRight com.apple.launchd[1]
17/03/09 6:34:50 PM (org.ntp.ntpd) Unknown key: SHAuthorizationRight com.apple.launchd[1]
17/03/09 6:34:54 PM (org.ntp.ntpd[10194]) Stray process with PGID equal to this dead job: PID 10197 PPID 1 ntpdate com.apple.launchd[1]
17/03/09 6:34:54 PM (org.ntp.ntpd[10194]) Exited: Terminated com.apple.launchd[1]
17/03/09 6:34:54 PM (org.ntp.ntpd[10194]) Exited: Terminated com.apple.launchd[1]
17/03/09 6:35:25 PM launchctl: Error unloading: org.ntp.ntpd com.apple.service_helper[10191]
17/03/09 6:35:25 PM (org.ntp.ntpd) Unknown key: SHAuthorizationRight com.apple.launchd[1]
17/03/09 6:35:25 PM (org.ntp.ntpd) Unknown key: SHAuthorizationRight com.apple.launchd[1]
17/03/09 6:35:29 PM no server suitable for synchronization found ntpdate[10211]
17/03/09 6:35:29 PM no server suitable for synchronization found ntpdate[10211]
17/03/09 6:43:38 PM launchctl: Error unloading: org.ntp.ntpd com.apple.service_helper[10228]
17/03/09 6:43:38 PM (org.ntp.ntpd) Unknown key: SHAuthorizationRight com.apple.launchd[1]
17/03/09 6:43:38 PM (org.ntp.ntpd) Unknown key: SHAuthorizationRight com.apple.launchd[1]
17/03/09 6:43:42 PM no server suitable for synchronization found ntpdate[10234]
17/03/09 6:43:42 PM no server suitable for synchronization found ntpdate[10234]
17/03/09 6:44:14 PM launchctl: Error unloading: org.ntp.ntpd com.apple.service_helper[10228]
17/03/09 6:44:14 PM (org.ntp.ntpd) Unknown key: SHAuthorizationRight com.apple.launchd[1]
17/03/09 6:44:14 PM (org.ntp.ntpd) Unknown key: SHAuthorizationRight com.apple.launchd[1]
17/03/09 6:44:19 PM (org.ntp.ntpd[10241]) Stray process with PGID equal to this dead job: PID 10244 PPID 1 ntpdate com.apple.launchd[1]
17/03/09 6:44:19 PM (org.ntp.ntpd[10241]) Stray process with PGID equal to this dead job: PID 10244 PPID 1 ntpdate com.apple.launchd[1]
17/03/09 6:44:19 PM (org.ntp.ntpd[10241]) Exited: Terminated com.apple.launchd[1]
17/03/09 6:44:22 PM launchctl: Error unloading: org.ntp.ntpd com.apple.service_helper[10228]
17/03/09 6:44:22 PM (org.ntp.ntpd) Unknown key: SHAuthorizationRight com.apple.launchd[1]
17/03/09 6:44:22 PM (org.ntp.ntpd) Unknown key: SHAuthorizationRight com.apple.launchd[1]
17/03/09 6:44:27 PM (org.ntp.ntpd[10248]) Stray process with PGID equal to this dead job: PID 10251 PPID 1 ntpdate com.apple.launchd[1]
17/03/09 6:44:27 PM (org.ntp.ntpd[10248]) Exited: Terminated com.apple.launchd[1]
17/03/09 6:44:27 PM (org.ntp.ntpd[10248]) Exited: Terminated com.apple.launchd[1] - 0
biovizier ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
...
Are you able to make out something from this?"...Not really. I get the "SHAuthorizationRight" messages too, but I think this is normal - that property is present in the org.ntp.ntpd.plist file, yet is not found anywhere that I can see in the documentation so "unknown key" seems reasonable. The "Error unloading: org.ntp.ntpd" messages I can also reproduce on my system by toggling the checkbox, so that in itself probably is not an issue. I don't see the other messages on my system, but if anything, messages about dead jobs or being unable to find a server would seem to indicate '
ntpd' not working properly, rather than successfully resetting the time when it is supposed to be disabled.Going back to the first post, if the automatic update is disabled, I don't think you should be seeing '
ntpd' making connections to a time server, and it shouldn't be running at all. When the checkbox is unchecked, is there any evidence of a running '
ntpd' process? eg.<pre>
ps caux |grep [n]tpd</pre>Is the "org.ntp.ntpd" launch daemon loaded? From an "admin" account:<pre>
/usr/bin/sudo /bin/launchctl list |grep ntp</pre>What do the configuration files say? Eg.<pre>
grep TIMESYNC /private/etc/hostconfig
grep -A1 Disabled /System/Library/LaunchDaemons/org.ntp.ntpd.plist</pre>Maybe "System Preferences" is somehow out of sync with the actual status of the service. Or if the configuration files indicate that everything is disabled, maybe try rebooting...
- 0
R C-R ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
biovizier wrote:
Going back to the first post, if the automatic update is disabled, I don't think you should be seeing '
ntpd' making connections to a time server, and it shouldn't be running at all.This may be half right. Check out ntp.org support's
Section 9.2.5: Known Operating System Issues. According to that, changes to the preference pane will kill *and restart* ntpd. I believe this is to allow the ntpd service to continue to correct for clock drift. For more on this, see the
Mac OS X Manual Page For ntpd(8), in particular the "Frequency Discipline" & "Operating Modes" sections, & the info about the role of the drift file, one-time modes, the ntpdate workaround, etc.By no means do I claim to understand all of this but it seems evident that it is not as simple as checking if the ntpd process is running or not.
- 0
Virgule ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I ran the commands you provided. As far as I can tell, everything is in order.
*with the checkbox disabled*:
hostname:~ username$ ps caux |grep ntpd
hostname:~ username$ /usr/bin/sudo /bin/launchctl list |grep ntp
hostname:~ username$ grep TIMESYNC /private/etc/hostconfig
TIMESYNC=-NO-
hostname:~ username$ grep -A1 Disabled /System/Library/LaunchDaemons/org.ntp.ntpd.plist
<key>Disabled</key>
<true/>
hostname:~ username$
with the checkbox
enabled:hostname:~ username$ ps caux |grep ntpd
root 30353 0.0 0.0 75900 840 ?? Ss 3:35pm 0:00.02 ntpd
hostname:~ username$ /usr/bin/sudo /bin/launchctl list |grep ntp
30353 - org.ntp.ntpd
hostname:~ username$ grep TIMESYNC /private/etc/hostconfig
TIMESYNC=-YES-
hostname:~ username$ grep -A1 Disabled /System/Library/LaunchDaemons/org.ntp.ntpd.plist
hostname:~ username$</pre>
Cycling the checkbox must have set things right.
Now that I have said that, it's /bin/sh who connects to time.apple.com.?:D - 0
biovizier ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I agree - the settings seem to be in order. But I'm not sure I follow...
..."
Now that I have said that, it's /bin/sh who connects to time.apple.com.?:D"...So are the logs still showing recent unexplained connection attempts to time.apple.com even with everything indicating '
ntpd' is disabled? But I see the emoticon on the end there too... - 0
Virgule ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
It is Little Snitch who report that. Upon enabling the checkbox, ntpdate and sh connect to time.apple.com:
http://imgur.com/84PYQ.png (sh connection history)
http://imgur.com/84QQI.png (ntpdate connection history)
http://imgur.com/84T1U.png (caught both at once)The green text fade away over time. So, sh has been the last to connect.
They both seam to stay put with the checkbox disabled.
- 0
biovizier ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
When the "Set date & time automatically..." checkbox is checked, the sequence of events appears to be that '
/bin/sh' calls '
/usr/libexec/ntpd-wrapper', which in turn runs '
ntpdate' before starting '
ntpd'.I'm not very familiar with "LittleSnitch" and how it reports things. Could it just be flagging '
sh' as a process involved in setting things in motion, rather than saying that '
sh' itself directly is attempting to make the connection?Anyway, if '
ntpd' is behaving when the checkbox is unchecked, I agree with your earlier thought that the problem appears to have straightened itself out (perhaps by toggling the checkbox). Out of curiosity, I had unchecked the setting on my computer at the beginning of my involvement in this thread, and as expected, have had no evidence of either '
ntpd' or '
ntpdate' having been accessed at all in that time.