Sponsored Content
Full Discussion: Solaris zones and PATH
Operating Systems Solaris Solaris zones and PATH Post 302359373 by jabberwocky on Tuesday 6th of October 2009 11:30:14 AM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
lint(1B)                                             SunOS/BSD Compatibility Package Commands                                             lint(1B)

NAME
lint - C program verifier SYNOPSIS
/usr/ucb/lint [options] DESCRIPTION
/usr/ucb/lint is the interface to the BSD Compatibility Package C program verifier. It is a script that looks for the link /usr/ccs/bin/ucblint to the C program verifier. /usr/ccs/bin/ucblint is available only with the SPROcc package, whose default location is /opt/SUNWspro. /usr/ucb/lint is identical to /usr/ccs/bin/ucblint, except that BSD headers are used and BSD libraries are linked before base libraries. The /opt/SUNWspro/man/man1/lint.1 man page is available only with the SPROcc package. OPTIONS
/usr/ucb/lint accepts the same options as /usr/ccs/bin/ucblint, with the following exceptions: -Idir Search dir for included files whose names do not begin with a slash (/) prior to searching the usual directories. The directories for multiple -I options are searched in the order specified. The preprocessor first searches for #include files in the directory containing sourcefile, and then in directories named with -I options (if any), then /usr/ucbinclude, and finally, in /usr/include. -Ldir Add dir to the list of directories searched for libraries by /usr/ccs/bin/ucblint. This option is passed to /usr/ccs/bin/ld. Directories specified with this option are searched before /usr/ucblib and /usr/lib. -Y P, dir Change the default directory used for finding libraries. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. FILES
/usr/lint/bin/ld link editor /usr/lib/libc C library /usr/ucbinclude BSD Compatibility directory for header files /usr/ucblib BSD Compatibility directory for libraries /usr/ucblib/libucb BSD Compatibility C library /usr/lib/libsocket library containing socket routines /usr/lib/libnsl library containing network functions /usr/lib/libelf library containing routines to process ELF object files /usr/lib/libaio library containing asynchronous I/O routines ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
ld(1), a.out(4), attributes(5) SunOS 5.10 1 Feb 1995 lint(1B)
All times are GMT -4. The time now is 12:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy