Operating System - HP-UX
1834813 Members
2514 Online
110070 Solutions
New Discussion

[Q] the case of repeatedly overwriting .dtprofile once user log in is occuring ..

 
Tony, Lim
Frequent Advisor

[Q] the case of repeatedly overwriting .dtprofile once user log in is occuring ..

We are using User accounts under NIS environment.

Once I log in our HPUX, it could not accept .profile and always commented DTSOURCEPORFILE=TRUE in .dtprofile, even though I uncommented DFSOURCEPROFILE=TRUE in .dtprofile before.

I'm not sure what cause this problems.

So, I could not view user name, hostname, PATH at prompt line when I first loged in.

Now, I am using manually execute .profile like this.

# . ./.profile

Another NIS users have similar conditions.

I did change ownership .dtprofile to root and permission .dtprofile to 444 only can read after uncomment DTSOURCEPROFILE=TRUE in .dtprofile.

Neverthless, it was overwritten to new .dtprofile with commented DTSOURCEPROFILE=TURE part.

Please let me know what I should check it up to prevent from overwriting at user's login process ??
When user try to log in, What scripts are executed ?? Is there any sequence ??

==========================================

For reference, that user's profile is ..

. ./.kshrc

And, .kshrc file has contents such as..

PATH=.:/usr/sbin:$PATH:/sbin:/home/infodba:/usr/ucb
#PATH=/home/infodba:$PATH

export HISTSIZE=800
export HISTFILE=/.sh_history

set -o trackall

if [ `uname -s` = 'SunOS' ]
then
export PS1="`/usr/xpg4/bin/id -un`@`hostname`-KOR:\$PWD$ "
alias df='df -k'
else
export PS1="`id -un`@`hostname`-KOR:\$PWD$ "
alias df='bdf'
fi

set -o vi
stty erase "^H" kill "^U" intr "^C" eof "^D"
umask 022
export EDITOR=/bin/vi
1 REPLY 1
Pete Randall
Outstanding Contributor

Re: [Q] the case of repeatedly overwriting .dtprofile once user log in is occuring ..

It sounds like some clever administrator wanted to make it so that users could not alter their .dtprofile. Check /etc/profile to see if there is code in there to copy a default .dtprofile into the user's home directory on login.


Pete

Pete