Solaris zones and PATH

Hi,

I use a zoned solaris box, 5.10 Generic_118833-33, E2900. It is used for both a database and application. The databases are installated on one zone and then there are separate live, development and test application zones.

There has been a requirement to install openldap on the application servers.
Each application has its own OS user that owns the application software.
There are about 150 applications on the zones in total.

Part of the ldap requirement is to set up the PATH environment variable for the OS user to pick up 'cc' from SUNWspro/bin, in the .profile.

Because of the large number of different OS users, I am in the habit of logging on to the global zone, su - , to switch to root, then use zlogin <zone_name> to logon to appropriate zone as root, then su - <OS user> to enter a shell as the OS user that owns the application.

For anyone else from other departments, we supply them with the password for the appropriate OS user when they need to investigate anything on the application sever, this allows them to logon directly to the zone, without the need for root access.

Following extensive investigation after some compilation issues I have found that the .profile is invoked differently when logging directlly into the zone and when using zlogin to access the zone from the global zone and then invoking su - <OS user>.

For a .profile thus:

PATH=$PATH/opt/SUNWspro/bin:/usr/ucb:/usr/ccs/bin
export PATH

Running su - from a zlogin shell as root to this user gives a PATH of

...etc/usr/sbin:/usr/bin:/opt/SUNWspro/bin:/usr/ucb:/usr/ccs/bin

However logging directly into the zone as the OS user gives:

...etc/usr/sbin:/usr/bin/opt/SUNWspro/bin:/usr/ucb:/usr/ccs/bin

The path appended to the PATH variable is incorrect on logging directly into the zone.

Does anyone know who to append to the $PATH variable in a way so that both methods of logging in will show the same, correct value for $PATH.

Thanks,

Jabberwocky

The PATH setting line is incorrect and should be:

 PATH=$PATH:/opt/SUNWspro/bin:/usr/ccs/bin

i.e. add a semicolon to separate PATH components and remove ucb which is useless.