How to Set the Correct Time online on Linux System .
Hi,
If your linux system does not showing correct time then use the below mentioned script . It is very simple & possible solution to perform this. Here is the example.
Step 1. Create the file rdate in mentioned path
/etc/init.d/rdate
$ cat rdate
#! /bin/sh
# rdate Execute the rdate command.
PATH=/sbin:/bin:/usr/sbin:/usr/bin
HOST=dilbert
if [ -x /usr/sbin/rdate ]
then
/usr/sbin/rdate $HOST
Step 2. Give the permission to rdate file for execution
chmod a+2. rx /etc/init.d/rdate
Step 3. Create a symbolic link to that file in directory /etc/rc2.d
cd /etc/rc2.d
ln -s ../init.d/rdate S19rdate
Step 4. Restart the System and you will see the time being set now.
If your linux system does not showing correct time then use the below mentioned script . It is very simple & possible solution to perform this. Here is the example.
Step 1. Create the file rdate in mentioned path
/etc/init.d/rdate
$ cat rdate
#! /bin/sh
# rdate Execute the rdate command.
PATH=/sbin:/bin:/usr/sbin:/usr/bin
HOST=dilbert
if [ -x /usr/sbin/rdate ]
then
/usr/sbin/rdate $HOST
Step 2. Give the permission to rdate file for execution
chmod a+2. rx /etc/init.d/rdate
Step 3. Create a symbolic link to that file in directory /etc/rc2.d
cd /etc/rc2.d
ln -s ../init.d/rdate S19rdate
Step 4. Restart the System and you will see the time being set now.
Comments
Post a Comment