- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Root date not synchronized with user date
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2008 09:52 PM
03-30-2008 09:52 PM
Root date not synchronized with user date
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2008 10:09 PM
03-30-2008 10:09 PM
Re: Root date not synchronized with user date
MK
- Tags:
- TZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2008 10:13 PM
03-30-2008 10:13 PM
Re: Root date not synchronized with user date
=================================
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2008 10:24 PM
03-30-2008 10:24 PM
Re: Root date not synchronized with user date
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2008 10:31 PM
03-30-2008 10:31 PM
Re: Root date not synchronized with user date
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2008 10:33 PM
03-30-2008 10:33 PM
Re: Root date not synchronized with user date
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2008 10:38 PM
03-30-2008 10:38 PM
Re: Root date not synchronized with user date
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2008 10:39 PM
03-30-2008 10:39 PM
Re: Root date not synchronized with user date
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2008 10:43 PM
03-30-2008 10:43 PM
Re: Root date not synchronized with user date
this error appeared.
=======================
$ $TZ=mal-8
sh: TZ: Parameter not set.
$ id
uid=116(faiznaq) gid=20(users)
thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2008 11:20 PM
03-30-2008 11:20 PM
Re: Root date not synchronized with user date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2008 11:43 PM
03-30-2008 11:43 PM
Re: Root date not synchronized with user date
when i set
# export TZ=mal-8
# echo $TZ
the date successfully change to faiznaq user id. but when i log out and login again, the date back to incorrect one.
so i set the the TZ at /etc/profile. but still, the date are not synchronized.
sigh..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2008 12:28 AM
03-31-2008 12:28 AM
Re: Root date not synchronized with user date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2008 12:52 AM
03-31-2008 12:52 AM
Re: Root date not synchronized with user date
still not working. i've added in .profile at root. still the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2008 01:20 AM
03-31-2008 01:20 AM
Re: Root date not synchronized with user date
First of all, determine the HOME directory of user "faiznaq":
grep -i faiznaq /etc/passwd
e.g.
SRV2: home/yogeeraj>grep -i yogee /etc/passwd
yogee:dEJ.1HPXbbiSU:301:102:,,,:/home/yogeeraj:/usr/bin/ksh
SRV2: home/yogeeraj>
Then, verify the .profile of the user
e.g.
SRV2: home/yogeeraj> cat /home/yogeeraj/.profile
Do you see anything in the .profile concerning the TZ environment variable?
(it may also be that this is being sourced from another file... you may wish to post the .profile here for further verifications)
revert
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2008 01:40 AM
03-31-2008 01:40 AM
Re: Root date not synchronized with user date
this is user .profile.
===============================
N4000_1] /home/faiznaq > more .profile
# @(#)B.11.11_LR
# Default user .profile file (/usr/bin/sh initialization).
# Set up the terminal:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
# Set up the search paths:
PATH=$PATH:.
# Set up the shell environment:
set -u
trap "echo 'logout'" 0
# Set up the shell variables:
EDITOR=vi
export EDITOR
==============================
the problem is, all users under users group id is facing this problem. not only faiznaq's user id.
any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2008 02:42 AM
03-31-2008 02:42 AM
Re: Root date not synchronized with user date
When any user logs in, the system will start a shell for him/her, then the shell will execute a "system-wide" login script. If the user's shell is sh (the default), ksh or some other shell of the Bourne shell family, this login script is /etc/profile. If the user's shell is csh or tcsh, the system-wide login script is different: it will be /etc/csh.cshrc. The system-wide login script should set the TZ variable to the system's default value. In HP-UX, the default setting is read from file /etc/TIMEZONE.
All users must be able to read the /etc/TIMEZONE file. The file must contain a valid sh-style environment variable setting command, e.g.:
TZ=EET-2EETDST
export TZ
After the system-wide login script, the shell will check the user's home directory and execute a user-specific login script if one exists. For sh and ksh, this is named ".profile"; for csh and tcsh, there are two possible filenames: ".login" and/or ".cshrc".
These scripts can expand or override the settings of the system-wide startup scripts, and could change the timezone if the user wants to do that. But looks like your user's ".profile" is the default version, so the user has not made any changes like that.
What is the output of these commands?
ll /etc/TIMEZONE
cat /etc/TIMEZONE
Your TZ variable setting of "mal-8" looks non-standard. The standard timezone identifiers should be in UPPER CASE. According to the /usr/lib/tztab file of one HP-UX 11.11 machine, the standard setting for Malaysia should be something like "PST-8PDT". If you don't want to use the Daylight Saving Time feature, you should omit the PDT part and set the TZ variable to "PST-8". Using "mal" instead of "PST" may affect some applications that use the timezone information.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2008 02:48 AM
03-31-2008 02:48 AM
Re: Root date not synchronized with user date
On top of th output of these commands:
ll /etc/TIMEZONE
cat /etc/TIMEZONE
can you also post your /etc/profile?
the .profile does not containing anything that can help us. Does all the users share the same HOME?
revert
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2008 02:55 AM
03-31-2008 02:55 AM
Re: Root date not synchronized with user date
yes! all user shared same HOME.
this is my /etc/profile
===============================
N4000_1] / > cat /etc/profile
# @(#)B.11.11_LR
# Default (example of) system-wide profile file (/usr/bin/sh initialization).
# This should be kept to the bare minimum every user needs.
# Ignore HUP, INT, QUIT now.
trap "" 1 2 3
# Set the default paths - Do NOT modify these.
# Modify the variables through /etc/PATH and /etc/MANPATH
PATH=/usr/bin:/usr/ccs/bin:/usr/contrib/bin
MANPATH=/usr/share/man:/usr/contrib/man:/usr/local/man
# Insure PATH contains either /usr/bin or /sbin (if /usr/bin is not available).
if [ ! -d /usr/sbin ]
then
PATH=$PATH:/sbin
else if [ -r /etc/PATH ]
then
# Insure that $PATH includes /usr/bin . If /usr/bin is
# present in /etc/PATH then $PATH is set to the contents
# of /etc/PATH. Otherwise, add the contents of /etc/PATH
# to the end of the default $PATH definition above.
grep -q -e "^/usr/bin$" -e "^/usr/bin:" -e ":/usr/bin:"\
-e ":/usr/bin$" /etc/PATH
if [ $? -eq 0 ]
then
PATH=`cat /etc/PATH`
else
PATH=$PATH:`cat /etc/PATH`
fi
fi
fi
export PATH
# Set MANPATH to the contents of /etc/MANPATH, if it exists.
if [ -r /etc/MANPATH ]
then
MANPATH=`cat /etc/MANPATH`
fi
export MANPATH
# Set the TIMEZONE
if [ -r /etc/TIMEZONE ]
then
. /etc/TIMEZONE
else
TZ=mal-8 # change this for local time.
# TZ=MST7MDT //default
export TZ
fi
# Be sure that VUE does not invoke tty commands
if [ ! "$VUE" ]; then
# set term if it's not set
if [ "$TERM" = "" -o "$TERM" = "unknown" -o "$TERM" = "dialup" \
-o "$TERM" = "network" ]
then
eval `ttytype -s -a`
fi
export TERM
# set erase to ^H, if ERASE is not set
if [ "$ERASE" = "" ]
then
ERASE="^H"
export ERASE
fi
stty erase $ERASE
# Set up shell environment:
trap "echo logout" 0
# This is to meet legal requirements...
cat /etc/copyright
# Message of the day
if [ -r /etc/motd ]
then
cat /etc/motd
fi
# Notify if there is mail
if [ -f /usr/bin/mail ]
then
if mail -e
then echo "You have mail."
fi
fi
# Notify if there is news
if [ -f /usr/bin/news ]
then news -n
fi
# Change the backup tape
if [ -r /tmp/changetape ]
then echo "\007\nYou are the first to log in since backup:"
echo "Please change the backup tape.\n"
rm -f /tmp/changetape
fi
fi # if !VUE
# Leave defaults in user environment.
trap 1 2 3
===================================
N4000_1] / > ls -lrt /etc/TIMEZONE
-r--r--r-- 1 bin bin 19 Mar 2 2006 /etc/TIMEZONE
N4000_1] / > cat /etc/TIMEZONE
TZ=mal-8
=====================================
thanks everyone..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2008 02:57 AM
03-31-2008 02:57 AM
Re: Root date not synchronized with user date
If all your users are in the same timezone you need to fix your file /etc/TIMEZONE.
If they aren't in the same timezone, it is the responsibility of the odd users to edit their .profile and set TZ as they need.
Please provide the output of: date -u
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2008 03:58 AM
03-31-2008 03:58 AM
Re: Root date not synchronized with user date
# Set the TIMEZONE
if [ -r /etc/TIMEZONE ]; then
. /etc/TIMEZONE
else
TZ=mal-8 # change this for local time.
export TZ
fi
Since /etc/TIMEZONE should exist, it won't go though the TZ=mal-8 path. Just edit /etc/TIMEZONE and you can remove this code from /etc/profile.
>MK: Using "mal" instead of "PST" may affect some applications that use the timezone information.
Affect? Do you mean in a bad way?
If MAL is the correct timezone name, then that's what it should be. (I would recommend upper case too.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2008 10:49 AM
03-31-2008 10:49 AM
Re: Root date not synchronized with user date
It seems that your user not getting the TimeZone variable.
#more /etc/TIMEZONE
TZ=GMT-6
export TZ
Make correct the GMT value here and then add this timezone to your user .profile.
Thanks & Regards
Aashique
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2008 05:35 PM
03-31-2008 05:35 PM
Re: Root date not synchronized with user date
Note it is never a good idea to set your timezone to GMT with anything other than 0.
Otherwise you will get a -6 offset but all of the timestamps will say GMT and it will be confusing.