.sh_profile not updating

Dear Gurus

i have read a lot written on this topic but i just wanna ask that the /etc/profile file is present but the .sh_profile in the users $HOME directory is not being updated, any guesses why???
Also that i need to get the information about the date, time, IP and the user name from which the user logs in???
Please help???

1) /etc/profile is typically the default profile run by users at login, prior to any profile in their own directory. What and how do you excpect something to be updated?

2) details on users... are your referring to some kind of audit report?

Well what i am saying is that i have enabled the logging of commands that the user run in the .sh_history file. But the file is not updating!!!!

The standard shell in AIX is ksh. Therefore the correct file to put settings into is not ".sh_profile" but ".kshrc" in the users $HOME.

If you want to be 101% sure put a ". ~/.kshrc" as the last line into the file "~/.profile".

For details about users sessions you might want to examine the wtmp and the utmp files, both in the "/var" tree. Consult your man pages about both for details and also the tools (last, etc.) to examine them.

I hope this helps.

bakunin

Did what u told me but then again the .sh_history is not updating, can u clearify if i need to restart the system or some process to get it working????

You might want to read this thread about a detailed explanation. Experiment a bit.

Check if there is a ksh_exit routine in place which might delete the file written this way.

I hope this helps.

bakunin

The .sh_history is updating for the root
files but they are not for the remaining users, any thoughts on that????

Also here is my profile file!!!
trap "" 1 2 3
readonly LOGNAME

# Automatic logout, include in export line if uncommented
# TMOUT=120

# The MAILMSG will be printed by the shell every MAILCHECK seconds
# (default 600) if there is mail in the MAIL system mailbox.
MAIL=/usr/spool/mail/$LOGNAME
MAILMSG="[YOU HAVE NEW MAIL]"

# If termdef command returns terminal type (i.e. a non NULL value),
# set TERM to the returned value, else set TERM to default lft.
TERM_DEFAULT=lft
TERM=`termdef`
TERM=${TERM:-$TERM_DEFAULT}

# If LC_MESSAGES is set to "C@lft" and TERM is not set to "lft",
# unset LC_MESSAGES.
if [ "$LC_MESSAGES" = "C@lft" -a "$TERM" != "lft" ]
then
unset LC_MESSAGES
fi

export PS1 LOGNAME MAIL MAILMSG TERM

trap 1 2 3

What i need is the date and time in the .sh_history also can i use the same for the .profile file for other users