1854715 Members
9590 Online
104102 Solutions
New Discussion

Re: Stange situation

 
Filosofo
Regular Advisor

Stange situation

Hello boys,
I have a strange problem.
I have two identical system.
There are on eny system a user call pippo.
When I connect to system A
and edit
type ksh I see like output
ksh is /bin/ksh
on system B I see:
ksh is /usr/bin/ksh
If I execute this command like root I see:
ksh is /usr/bin/ksh.
I have superdome with 11i.
Why there is this different.
Please help me.

Thanks

Filo
Sistem engeneer expert
10 REPLIES 10
Geoff Wild
Honored Contributor

Re: Stange situation

Depends on which is in the PATH first - /usr/bin or /bin

Do an
echo $PATH
on both systems to check.


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Massimo Bianchi
Honored Contributor

Re: Stange situation

If you want to modify the lookup for PATH, check the following files (they are source in this order)

- /etc/PATH
- /etc/profile
- yourhome/.profile

HTH,
Massimo
Rainer von Bongartz
Honored Contributor

Re: Stange situation

Take care that you have identical files

/etc/PATH

on both boxes.

And see that no PATH statement is in /etc/profile and ~./.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: Stange situation

Thanks for help,
I see output of echo $PATH and on one of the two there is :/bin .
The .profile files are equal, the etc/PATH = , How can find where is set the PATH variable, if possible?

Thanks

Filo
Sistem engeneer expert
Vicente Sanchez_3
Respected Contributor

Re: Stange situation

Hello,

Have you checked /etc/profile?

HTH, Vicente.
James R. Ferguson
Acclaimed Contributor

Re: Stange situation

Hi Filo:

If you examine '/etc/profile' you will see that it builds the PATH variable from the global '/etc/PATH' specification.

The MANPATH is build in similar fashion.

Regards!

...JRF...
Filosofo
Regular Advisor

Re: Stange situation

Hello,
Yes I check /etc/profile and there isn't different, there isn't :/bin.

Thanks for all your help

filo
Sistem engeneer expert
Shannon Petry
Honored Contributor

Re: Stange situation

This will not help with your PATH problems, but give you better practices...

NEVER USE /bin/ksh, /bin/sh, /bin/csh!

BSD systems store base shells "most" of the time in /bin. This has been a practice in AIX and Solaris for quite some time. This continues with Linux.

System V stores base shells in /usr/bin. This is the case with HP-UX, Irix, SCO, and of course some Linux.

BSD sytems try very hard to conform to some of the good habits of System V. Hence, most shells if they exist now in /bin are linked to /usr/bin. Others (Solaris 9) have actually moved shells to the SysV location and linked back to the old BSD location.

Roots shell should never be changed or modified, however for best practices follow this rule.

When scripting, define the shell for any user driven script as #!/usr/bin/$SHELL. In passwd files, define all paths as /usr/bin/$SHELL. (Again DO NOT change root's shell).

Following these 2 simple rules will help you to survive in a multi-platform environment. Path for "which ksh" returning /bin or /usr/bin means alot less than something not working because it is not there.

Have fun!
Shannon
Microsoft. When do you want a virus today?
Filosofo
Regular Advisor

Re: Stange situation

Thanks for all yours help.
In the .profile there is a command to execute another script, an into this script I view the different.

Filo
Sistem engeneer expert
Jean-Louis Phelix
Honored Contributor

Re: Stange situation

Hi,

Did you look at .dtprofile if you log on using CDE ?

Regards
It works for me (© Bill McNAMARA ...)