Operating System - HP-UX
1837203 Members
2241 Online
110115 Solutions
New Discussion

ksh environment variables

 
SOLVED
Go to solution
sameer_5
Advisor

ksh environment variables

Hi,

I create a user with a shell /usr/bin/ksh. when I login to that user my profile is not executed. I tried the following
1) ./.profile (Profile ran but environment varible does not set)
2) sh .profile (result is same as above)
3) . .profile (ksh: .profile not found. I set #!/usr/bin/ksh at the top of my profile)

For simplicy , the permission of my profile is set to 777.

4) if I login as root user and then exec newuser , the profile is executed and environment variable is set. The root user shell has /sbin/sh

Any help.
Thanks
Sam..
4 REPLIES 4
Paul Sperry
Honored Contributor
Solution

Re: ksh environment variables

make sure the users .dtprofile contains the following line

DTSOURCEPROFILE=true

make sure it is not commented out
RAC_1
Honored Contributor

Re: ksh environment variables

check permissions on user's .profile.

The login sequence is as follows.

/etc/profile
user's profile($HOME/.profile)

There is no substitute to HARDWORK
Jeff Schussele
Honored Contributor

Re: ksh environment variables

Hi Sam,

1) What's the ownership/perms on that user's .profile?
Should be 444 username/primary_group
2) Proper command to source the file would be:
. ./.profile
If you're in that user's home dir
3) You generally don't need a shell indicator at the top of a .profile file.
4) DO NOT change the default shell for root - system will be unbootable if you do.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
sameer_5
Advisor

Re: ksh environment variables

Thanks Paul. It worked.

Sam..