Hello All. I have an issue hoping all your input can be of help. Please bare with me as I am novice with UNIX. Let me know if anything I can clarify.<\/p>\n
Users are reporting that a UNIX machine (CentOS Linux 7) time is nearly 20mins off from the time server.<\/p>\n
There are 2 time servers which systems “should be” set to which are both Windows 10 machines.<\/p>\n
Comparing with another UNIX machine (RHEL server v7) that does not have a time sync issue, they both seem to have the same setup in /etc/ntp.conf<\/p>\n
We are able to manually change the time with the date --set “YYYYMMDD HH:MM” command although it changes once the machine/ntpd service is restarted and time sync is off again<\/p>\n
“restart service ntpd” i s not a recognized command.<\/p>\n
Any ideas? any additional info i can provide? anything that I can look further into?<\/p>\n
appreciate the help and hope to learn more from this.<\/p>","upvoteCount":5,"answerCount":11,"datePublished":"2022-02-25T20:41:52.000Z","author":{"@type":"Person","name":"ericcastillo","url":"https://community.spiceworks.com/u/ericcastillo"},"suggestedAnswer":[{"@type":"Answer","text":"
Hello All. I have an issue hoping all your input can be of help. Please bare with me as I am novice with UNIX. Let me know if anything I can clarify.<\/p>\n
Users are reporting that a UNIX machine (CentOS Linux 7) time is nearly 20mins off from the time server.<\/p>\n
There are 2 time servers which systems “should be” set to which are both Windows 10 machines.<\/p>\n
Comparing with another UNIX machine (RHEL server v7) that does not have a time sync issue, they both seem to have the same setup in /etc/ntp.conf<\/p>\n
We are able to manually change the time with the date --set “YYYYMMDD HH:MM” command although it changes once the machine/ntpd service is restarted and time sync is off again<\/p>\n
“restart service ntpd” i s not a recognized command.<\/p>\n
Any ideas? any additional info i can provide? anything that I can look further into?<\/p>\n
appreciate the help and hope to learn more from this.<\/p>","upvoteCount":5,"datePublished":"2022-02-25T20:41:52.000Z","url":"https://community.spiceworks.com/t/out-of-sync-with-time-server-unix/826176/1","author":{"@type":"Person","name":"ericcastillo","url":"https://community.spiceworks.com/u/ericcastillo"}},{"@type":"Answer","text":"
First make sure ntpd is installed.<\/p>\n
yum install ntpd<\/strong><\/p>\n Since centos 7 is a systemd configuration you need to use the systemctl command.<\/p>\n systemct status ntpd<\/strong><\/p>\n systemctl start ntpd<\/strong><\/p>\n and to enable ntpd on every reboot systemctl enable ntpd.<\/p>\n Just be aware that ntp will not correct if the time skew gets too large. So you can use the ntpdate<\/strong> command to set the local time to match the defined ntp server.<\/p>","upvoteCount":1,"datePublished":"2022-02-25T20:53:41.000Z","url":"https://community.spiceworks.com/t/out-of-sync-with-time-server-unix/826176/2","author":{"@type":"Person","name":"george1421","url":"https://community.spiceworks.com/u/george1421"}},{"@type":"Answer","text":" thanks for the reply.first i checked to see the machines current time and it appears accurate at the moment. not sure when it goes out of sync.<\/p>\n i ran the commands as you stated. all successful other than yum install ntpd ended with result of “no package ntpd available. error: nothing to do”. is that expected?<\/p>\n after running all the commands i checked the time and still appears in sync at the moment<\/p>","upvoteCount":0,"datePublished":"2022-02-25T21:48:31.000Z","url":"https://community.spiceworks.com/t/out-of-sync-with-time-server-unix/826176/3","author":{"@type":"Person","name":"ericcastillo","url":"https://community.spiceworks.com/u/ericcastillo"}},{"@type":"Answer","text":" OK lets try<\/p>\n yum install ntp<\/p>\n Its been a while since I’ve used a rhel based system<\/p>","upvoteCount":1,"datePublished":"2022-02-25T22:00:43.000Z","url":"https://community.spiceworks.com/t/out-of-sync-with-time-server-unix/826176/4","author":{"@type":"Person","name":"george1421","url":"https://community.spiceworks.com/u/george1421"}},{"@type":"Answer","text":" Also make sure the vm’s aren’t set to sync to the host ckock<\/p>","upvoteCount":1,"datePublished":"2022-02-25T22:24:05.000Z","url":"https://community.spiceworks.com/t/out-of-sync-with-time-server-unix/826176/5","author":{"@type":"Person","name":"maxsec","url":"https://community.spiceworks.com/u/maxsec"}},{"@type":"Answer","text":" Here is the official Red Hat documentation that might save you a lot of time.<\/p>\n