Visit Our UNIX and Linux User Community


Solaris zones and PATH


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris zones and PATH
# 1  
Old 10-06-2009
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
# 2  
Old 10-06-2009
The PATH setting line is incorrect and should be:
Code:
 PATH=$PATH:/opt/SUNWspro/bin:/usr/ccs/bin

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

Previous Thread | Next Thread
Test Your Knowledge in Computers #216
Difficulty: Easy
A network operating system is a specialized operating system for a social media company, like Facebook or Google.
True or False?

10 More Discussions You Might Find Interesting

1. Solaris

Migration of Solaris 10 on physical host to Solaris Zones

Hi All Kindly let me know how can I move Solaris 10 OS running update 10 on physical machine to another machine solaris zone running Solaris 10 update 11 (2 Replies)
Discussion started by: amity
2 Replies

2. Solaris

Solaris zones

Hi guys and gals, Does anyone know how to import solaris zones from the xml files that sit in /etc/zones? I want the zones from one machine to another, all I have is the XML files for the zones, so I can't export them first. Thanks in advance Martin (1 Reply)
Discussion started by: callmebob
1 Replies

3. Solaris

Solaris Zones

Hi friends, Actually I faced problem in solaris zone. i was created 4 zones on my server. but one of them is not working ? so, where i wll get the error logs, and how to troubleshoot the problem. i have some kind of urgency. Please reply. (2 Replies)
Discussion started by: rajaramrnb
2 Replies

4. UNIX for Dummies Questions & Answers

Solaris Zones

Hi Guys, I haven't worked on solaris zones earlier. I have a query regarding the zones. We have MQ software installed on a solaris container. I am not sure on which zone this s/w is intalled. I have logged into this container via putty. When I search for the package, I got the package... (7 Replies)
Discussion started by: vandi
7 Replies

5. Solaris

Solaris zones

Hi, I created a zone with separate /usr for the zone. when I do ping to newly created zone it showing alive, I am able to login through zone console zlogin -C -E <zone name> I created a test account on zone which is already existing under global zone and try to ssh, it is working fine but... (1 Reply)
Discussion started by: alberto
1 Replies

6. Solaris

Solaris Zones

Hi Every, I would like to know some questions on Zones??? 1.what are types of zones we can install in global zone??? 2.Exact difference between sparce root and whole root??? 3.can we change the ip address of a running zone??? 4.how to find our in which zone we are running and how many... (8 Replies)
Discussion started by: tirupathiraju_t
8 Replies

7. Solaris

Solaris Zones

I have a Solaris 10 box configured with a global zone and 3 non-global zones. All of the zones need to be configured so they can access and run an application in the global zone located at /export/home. How do i make this application and all of its accompanying files available to the 3 non-global... (3 Replies)
Discussion started by: goose25
3 Replies

8. Solaris

Regarding Solaris Zones

Hello All, I have a list of Local Zones in my list. I want to find out their Global Zone names exactly....I know the command "arp ..."But I dont know how to filter it correctly and find it out. Thanks in advance, Jacky (9 Replies)
Discussion started by: jegaraman
9 Replies

9. Solaris

Solaris zones

Hi All, I am getting zone error # /usr/sbin/zoneadm -z asflxpoc1 boot -s could not verify net address=169.185.246.229 physical=ce0: No such device or address could not verify net address=169.185.246.230 physical=ce0: No such device or address Any ideas for this error message. The... (13 Replies)
Discussion started by: jegaraman
13 Replies

10. UNIX for Advanced & Expert Users

Solaris Zones

okay people i need some help: i was able to configure zones on my solaris 10 server, the problem is I can't ssh into the zones!!! I can zlogin -C zone2 successfully for both zones. Am I missing something? I can ping the zones, but can't ssh. From the zones, I can ping my global server. (7 Replies)
Discussion started by: Sarccastik Dude
7 Replies

Featured Tech Videos