Operating System - HP-UX
1751805 Members
4974 Online
108781 Solutions
New Discussion юеВ

Re: Root date not synchronized with user date

 
Naqiud
Advisor

Root date not synchronized with user date

Hi,

do anyone ever face this problem? root date is updated. but not for user date. user and root date are not synchronize.
==========================================

N4000_1] / > date
Mon Mar 31 13:48:58 mal 2008
N4000_1] / > id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)
N4000_1] / >
logout root
$ id
uid=116(faiznaq) gid=20(users)
$ date
Mon Mar 31 00:49:10 EST 2008

============================================

how i can update both and synch both?

thanks in advance.
21 REPLIES 21
Matti_Kurkela
Honored Contributor

Re: Root date not synchronized with user date

Check the value of the TZ environment variable for both root and the user. Maybe the user lives in another time zone or has some other reason to use a TZ setting that does not match the system default.

MK
MK
Naqiud
Advisor

Re: Root date not synchronized with user date

what is TZ?

=================================

N4000_1] / > id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)
N4000_1] / > date
Mon Mar 31 14:11:10 mal 2008
N4000_1] / > which date
/usr/bin/date
N4000_1] / >
logout root
$ id
uid=116(faiznaq) gid=20(users)
$ date
Mon Mar 31 01:11:23 EST 2008
$ which date
/usr/bin/date
AL_3001
Regular Advisor

Re: Root date not synchronized with user date

Hello,

TZ is time zone variable set on the system. Do echo $TZ as a root user and a normal user or see the profile file of root and normal user. Hope this helps.

ie. of TZ
===================
> echo $TZ
GMT0BST
>
===================

Cheers,
Ashish
Naqiud
Advisor

Re: Root date not synchronized with user date

Thanks!

but, how to set the TZ for the user's?
i found taht root's TZ is different with user's TZ.

=========================================

N4000_1] / > echo $TZ
mal-8
N4000_1] / >
logout root
$ echo $TZ
sh: TZ: Parameter not set.
AL_3001
Regular Advisor

Re: Root date not synchronized with user date

Naquid,

DO let us know the o/p of TZ variable. If you have come to a conclusion, still let us know.

All the Best.

Cheers,
Ashish
Naqiud
Advisor

Re: Root date not synchronized with user date

Hi Ashish,

i didn't get you.. what does it mean? i just set the date, but i wondering why the system is not update the user's time and date.

thanks a lot.
AL_3001
Regular Advisor

Re: Root date not synchronized with user date

No probs.... Try this

As a normal user, do the following:

1. $TZ=mal-8 (to set the value of TZ variable)

2. $echos $TZ (to check the value set for normal user).


Cheers,
Ashish
Naqiud
Advisor

Re: Root date not synchronized with user date

Hi Ashish,

this error appeared.

=======================

$ $TZ=mal-8
sh: TZ: Parameter not set.
$ id
uid=116(faiznaq) gid=20(users)

thanks.
AL_3001
Regular Advisor

Re: Root date not synchronized with user date

Try to add entry of TZ variable in /etc/profile file.