Operating System - HP-UX
1834018 Members
2180 Online
110063 Solutions
New Discussion

Re: Date differrent for root and other users

 
royalsun
Occasional Advisor

Date differrent for root and other users

Hi Folks,

If I log into my HPUX 11.11 L300-8x server as root and type "date" the EST date which is correct displays.However if all other users log in and type "date" they get the date in EDT format.

Can anyone shed some light on this.All info will be appreciated.

Regards,

Mille
8 REPLIES 8
Tom Geudens
Honored Contributor

Re: Date differrent for root and other users

Hi Mille,
Is the TZ variable different between root and the other users ?
echo $TZ

Regards,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
Michael Tully
Honored Contributor

Re: Date differrent for root and other users


Looks like the user and root are getting a different timezone from somewhere.

When each user logs on, they should get the timezone from /etc/profile (which looks to /etc/TIMEZONE) and then runs the local .profile for each user. Have a look in ~root/.profile and ~user/.profile and compare any differences.
Anyone for a Mutiny ?
Umapathy S
Honored Contributor

Re: Date differrent for root and other users

Mille,
Check the TZ env variable for root and other users. It may be different.

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
Zigor Buruaga
Esteemed Contributor

Re: Date differrent for root and other users

Hi,

Check the ".profile" of root user and "/etc/profile". Look for lines like:

TZ=EST ( or EDT )
export TZ

Compare it with other user ".profile".
Also check the file "/etc/TIMEZONE".
Maybe some of that files is using the incorrect format.

Hope this helps.
Regards,
Zigor
royalsun
Occasional Advisor

Re: Date differrent for root and other users

Hi Folks,

Thanks I should have added that I had checked /etc/TIMEZONE and all profiles and there is nothing strange.I have added the correct TZ to users ".profile" as a way to fix it until I find out "why" this is happening.

Regards,

Mille
Umapathy S
Honored Contributor

Re: Date differrent for root and other users

Mille,
As said, /etc/profile should read /etc/TIMEZONE and set TZ properly. It is not recommended to change/update in users profiles.
Check, for any other script called from /etc/profile which modifies the TZ.

HTH,
Umapathy

Arise Awake and Stop NOT till the goal is Reached!
royalsun
Occasional Advisor

Re: Date differrent for root and other users

HI Folks,

I think the problem is that /etc/profile is not being read.All perms etc are OK so I do not understand.I added a string export MILLE=test1 , when I log in as root and "echo $MILLE" test1 displays but not when I log in as another user.

Regards,

Milos

royalsun
Occasional Advisor

Re: Date differrent for root and other users

HI Folks,

Thanks to all replies , I appreciate the response.The problem was the /etc/profile had no READ perm for users.Should have been my first port of call.

REgards,

MILLE