Sunday, May 8, 2005

Linux tip: Set the clock on systems running Linux

Having the correct operating system time is becoming more important today due to the time sensitivity of certain protocols such as LDAP and Kerberos. Even if you’re not currently using such protocols on your systems, accurate time stamping on logs can be a huge aid in troubleshooting and security.

It’s easy to set the time on Linux systems both manually and through NTP. Set the time manually with this command:

#date 0509171405

The above command sets the date and time to May 9 and 5:14 p.m. in the year 2005.

Synchronize with Internet time servers using the Network Time Protocol (NTP) using this command:

#ntpdate [time server URL]

Use multiple time servers by separating each one with a space. Find public NTP servers by using your favorite search engine to query on “NTP servers”. Your Linux/UNIX system may also be running the NTP daemon which will keep the time synchronized. Look for a file such as /etc/ntp.conf on such systems to configure the Network Time Protocol. Learn more about working with Linux in our two-day, hands-on Linux workshop, now available for onsite scheduling for groups of four or more. Bring us onsite to your location and we’ll gladly tailor the training to meet your unique needs. Click here or call 206.988.5858 for complete details.

No comments: