Operating System - HP-UX
1835540 Members
2935 Online
110078 Solutions
New Discussion

Starnge problem with user's profile

 
Filosofo
Regular Advisor

Starnge problem with user's profile

Hello,
I have two server and on this two server I have create two ugual users "users01".
On the first server thare aren't problem...but when users01 try to connect on 2?? server system ask my to set Oracle_home , I am sure that .profile is ugual (I have copy it).
I hope that you can help me.

Thanks

Filo
Sistem engeneer expert
10 REPLIES 10
T G Manikandan
Honored Contributor

Re: Starnge problem with user's profile

What about their shells?

If their default shell are similar then it should be fine.

sh/ksh .profile
.profile

csh .login or .cshrc


Rainer von Bongartz
Honored Contributor

Re: Starnge problem with user's profile

If you copied it does the user have appropriate permissions on ~HOME/.profile ???

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Filosofo
Regular Advisor

Re: Starnge problem with user's profile

The shall is ksh, and when I try to execute sh .profile I have the same problem, but only on ona server.
Yes I copy correctly the .profile file.

Thanks

Filo
Sistem engeneer expert
Massimo Bianchi
Honored Contributor

Re: Starnge problem with user's profile

Hi,
can you post the incriminated .profile ?

Is there anything that can ask similar question ?


If the .profile is celan, then you shuold look at the others files, as suggested.

Look also to /etc/profile, maybe some azardous boy has changed the systemwide profile....

HTH,
Massimo
Fragon
Trusted Contributor

Re: Starnge problem with user's profile

Hi Filo,
In Server1:
#more /etc/passwd |grep "users01"|cut -d : -f 7
In Server2:
#more /etc/passwd |grep "users01"|cut -d : -f 7

Are they the same? If the shell is different, they may run different startup script.

Or, please check users01's home directory!

-ux
T G Manikandan
Honored Contributor

Re: Starnge problem with user's profile

Just go to the .profile dir i.e. home directory of the user
re-initialize
using
$. ./.profile

Make sure that the .profile file is located in the home dir of hte user and the syntax is OK.
like
export ORACLE_HOME=/opt/...
Filosofo
Regular Advisor

Re: Starnge problem with user's profile

But Tehere isn't export ORACLE_HOME....on the servers but one of this after login set oracle home the other no.

Thanks

Filo
Sistem engeneer expert
Steven E. Protter
Exalted Contributor

Re: Starnge problem with user's profile

Trace the user profile very carefully on the working system.

You will find there is a missing piece or incorrect permissions on one of the source files or scripts you use to set ORACLE_HOME and other values.

Been there, done that, got the tee-shirt.

The behavior is exactly what I got in my early Oracle days.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: Starnge problem with user's profile

It is VERY common for workstation users or users that run CDE and terminal emulators to access HP-UX to not login 'normally'. This is because the default for CDE (and the obsolete VUE product) is for dtterm, xterm and hpterm NOT to run /etc/profile or .profile during login. (similarly for csh user, the /etc/csh.login file and .cshrc) The reasons behind the Xwindow behavior are obscure but nevertheless quite frustrating.

However, there is an easy fix: In each $HOME directory (the home directory for each user login), perform this task once:

echo "*loginShell: true" >> $HOME/.Xdefaults

Now when the user starts a remote terminal window such as hpterm or dtterm or xterm, the 'normal' Unix login process will be followed and both /etc/profile (the usual place to put ORACLE_HOME and other environmental settings) and $HOME/.profile will be executed.

Note that the CDE variable DTSOURCEPROFILE only affects .profile so it misses the important /etc/profile file. And you can also add the loginShell directive to the startup of dtterm, hpterm or xterm (the option is -ls).

Now if you do not use Xwindows, then verify that your users have a standard shell (/usr/bin/sh or /usr/bin/ksh). Shells like csh, bash, tcsh, etc, should ALWAYS be avoided (better yet: forbidden) on production servers as they create sysadmin nightmares for support. And to see if /etc/profile and the local .profile are really being executed, put a print or an echo at the front of both files so you know they are being run:

echo "...Now running /etc/profile..."

or

echo "...Now running $HOME/.profile..."

If this works OK but the values are still not set, use the shell script trace option as in:

sh -x /etc/profile

or

sh -x $HOME/.profile

For users with a problem.


Bill Hassell, sysadmin
Filosofo
Regular Advisor

Re: Starnge problem with user's profile

Thanks ALL....Finnaly I find the different file /etc/oratab .
All the day for find a ":" different....

Thanks

Filo
Sistem engeneer expert