Admins eHow SysAdmin Tips & Tricks

July 20, 2010

Configure auto time sync on windows 2008 r2

Filed under: Windows — Tags: , , , , — admin @ 2:48 pm

Run the following commands as admin in command prompt :

W32tm /config /syncfromflags:manual /manualpeerlist:""
W32tm /config /reliable:yes
W32tm /config /update
W32tm /resync
Net stop w32time
Net start w32time

March 5, 2010

How to sync dreambox date and time automatically

Filed under: DreamBox — Tags: , , , — admin @ 9:37 am

I could not find rdate or ntpclient packages for dreambox , so I came up with another solution to sync my dreambox date and time when it boots up.
First you need another server with synced date and time , so we can read the correct date and time from it. also we need a webserver and php installed on it.
Create a script named “dreambox-date.php” on root folder of your web server with following content :

echo date("Y.m.d-G:i:s");

Create another file named “03datesync” in “/etc/network/if-up.d” folder of your dreambox with following content :

date -u -s `wget -O - http://IP_OR_FQDN/dreambox-date.php`

Change IP_OR_FQDN to your own hosting IP and domain name.
Also make it executable :

chmod +x 03datesync

All done 🙂 Now when dreambox boots up and its network interface is up , the above script would be called and it syncs your dreambox date and time.

June 29, 2009

How to synchronize Linux Time Daily

Filed under: CentOS,Debian,General — Tags: , , , , — admin @ 6:51 pm

First you need to install rdate package.
For Debian :

apt-get install rdate

For CentOS :

yum install rdate

After installing the rdate package , install a new cron job to be run daily to synchronize your machine time and date.

crontab -e

and enter the following line into the cron file :

0 0 * * * /usr/bin/rdate -s && /sbin/hwclock --systohc

Powered by WordPress