- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- system date gets changed as per user
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
02-13-2004 09:16 PM
02-13-2004 09:16 PM
On my unix server system time gets changed. when i login As root, it shows correct times as
Sat Feb 14 15:41:58 IST 2004,
when i login as oracle or other user it shows
Sat Feb 14 04:57:21 EST 2004
What could be the reason ? how can i change it the same to IST time..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2004 10:49 PM
02-13-2004 10:49 PM
Re: system date gets changed as per user
The users timezone is set the /etc/profile (global settings) if the oracle timezone differs from the global timezone, oracle $home/.profile has probably got an other timezone set.
Hope this helps,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2004 10:57 PM
02-13-2004 10:57 PM
Re: system date gets changed as per user
ex:
nbkp|/ub00/oracle>id
uid=501(oracle) gid=101(dba)
nbkp|/ub00/oracle>date
Sat Feb 14 06:55:46 EST 2004
nbkp|/ub00/oracle>exit
logout
#
#
# id
uid=0(root) gid=3(sys) groups=0(root),1(other),2(bin),4(adm),5(daemon),6(mail),7(lp),20(users)
# date
Sat Feb 14 17:26:16 IST 2004
#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2004 11:04 PM
02-13-2004 11:04 PM
Re: system date gets changed as per user
Check the file /etc/TIMZONE ?
What is in it ?
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2004 11:04 PM
02-13-2004 11:04 PM
Re: system date gets changed as per user
Roots profiles is differnt to user profiles check which profile they are using and set correct Timezone.
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2004 11:04 PM
02-13-2004 11:04 PM
Re: system date gets changed as per user
Check the file /etc/TIMEZONE ?
What is in it ?
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2004 11:04 PM
02-13-2004 11:04 PM
Re: system date gets changed as per user
can you post a .profile of one of these users?
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2004 11:48 PM
02-13-2004 11:48 PM
Re: system date gets changed as per user
uid=137(hpsysdba) gid=20(users)
$cat .profile
# @(#) $Revision: 72.2 $
# 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:.:/usr/sbin
export PATH
# Set up the shell environment:
set -u
trap "echo 'logout'" 0
# Set up the shell environment:
set -u
trap "echo 'logout'" 0
# Set up the shell variables:
EDITOR=vi
export EDITOR
PS1='$hn|$PWD>';export PS1
umask 027
**********************************************
nbkp|/etc>ll TIMEZONE
-r--r--r-- 1 bin bin 22 Feb 14 05:59 TIMEZONE
nbkp|/etc>pg TIMEZONE
TZ=IST-5:30
export TZ
(EOF):
.......
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2004 11:54 PM
02-13-2004 11:54 PM
Re: system date gets changed as per user
So the /etc/TIMEZONE is correct. check the /etc/profile for the lines simular to below example.
# Set the TIMEZONE
if [ -r /etc/TIMEZONE ]
then
. /etc/TIMEZONE
else
TZ=MST7MDT # change this for local time
export TZ
fi
and check root's /.profile for the same.
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2004 12:04 AM
02-14-2004 12:04 AM
Re: system date gets changed as per user
# Set the TIMEZONE
if [ -r /etc/TIMEZONE ]
then
. /etc/TIMEZONE
else
TZ=MST7MDT # change this for local time.
export TZ
fi
/etc/profile is proper as shown..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2004 09:23 PM
02-14-2004 09:23 PM
Solutionif the timezone is defined there are users are unable to read it then it would be a problem.
/etc/profile should be referenced by sh,ksh users.If you are having users with csh then also make sure that /etc/csh.login has a definition to that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2004 02:32 PM
02-15-2004 02:32 PM
Re: system date gets changed as per user
This should find where TZ is set:
grep TZ /etc/profile /etc/csh.login
cd ~user-name
grep TZ .profile .login
Be sure to cd to root and also to a couple of users. If TZ is only set in /etc/profile and /etc/csh.login, then someone has changed the permissions for /etc/TIMEZONE have been altered (not good). Verify this by logging in as a normal user and type the command:
. /etc/TIMEZONE
If you get permission denied, someone with the root password has changed the permissions. /etc/TIMEZONE should be 444 permission (read for everytone).
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2004 05:02 PM
02-15-2004 05:02 PM
Re: system date gets changed as per user
TZ variable cal also be set for individual user with their profiles . Either you can scan the system and get rid off the TZ setting if any on the individual user profiles or set one globally .Ofcourse pls determine what your country TZ should be .
Ex => export TZ=SAST-2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2004 05:30 PM
02-15-2004 05:30 PM
Re: system date gets changed as per user
$ . /etc/TIMEZONE
$ date
If that doesn't work, you might check rights on /etc itself...
If it does work, start looking for run scripts related to shells. Those are called .bashrc or .kshrc, depending on the shell they use.
But there is one other thing that beats me: if /etc/TIMEZONE is not readable, the default TIMEZONE would be MDT or MST, not EST. So it seems somewhere the TIMEZONE variable is overruled. But I'm missing parts of your .profile, because I see no definition of the 'hn' enviroronment variable, used in your prompt, so maybe the place where that gets set is also the place where TIMEZONE is overruled...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2004 01:05 AM
02-17-2004 01:05 AM
Re: system date gets changed as per user
does anyone work with CDE or is there any other login, where /etc/profile isn't used?
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2004 01:26 AM
02-17-2004 01:26 AM
Re: system date gets changed as per user
So the default is never to run a 'normal' profile at login when using CDE or VUE. However, there are two easy fixes:
1. Don't use CDE or VUE, especially when running it on a non-Xwindows machine like a PC. Use a local telnet or ssh client such as WRQ's Reflection terminal (not Reflection/X) product, QCterm (freebie but no ssh) or similar.
2. Create .Xdefaults in the $HOME directory where you login. You can include all sorts of decoration information but the most important is the loginShell details:
*loginShell: true
HPterm*background: navy
HPterm*foreground: white
HPterm*saveLines: 10s
HPterm*scrollBar: true
Xterm*background: darkslateblue
Xterm*foreground: white
Xterm*saveLines: 10s
Xterm*scrollBar: true
Dtterm*saveLines: 10s
Dtterm*scrollBar: true
This file (.Xdefaults) must be stored in the machine where you run CDE or VUE. As you start CDE or VUE (or simply start hpterm, xterm or dtterm), they will inherit these settings as appropriate. You'll see some references to .dtprofile and a resource setting DTSOURCEPROFILE=true. Unfortunately, this is an incomplete solution (never runs /etc/profile) so don't bother with .dtprofile.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2004 02:40 AM
02-17-2004 02:40 AM
Re: system date gets changed as per user
does ln /etc/profile /etc/dt/config/Xsession.d/profile
chmod +rx /etc/dt/config/Xsession.d/profile
change anything?
Michael