- 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
Discussions
Discussions
Forums
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
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 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.)