Re: Solaris strip LD_LIBRARY_PATH when su - oracle

From: joel garry <joel-garry_at_home.com>
Date: Thu, 14 May 2009 10:39:43 -0700 (PDT)
Message-ID: <64bd65b9-b54b-4933-888b-0fcd49a96f94_at_c18g2000prh.googlegroups.com>



On May 14, 10:04 am, joel garry <joel-ga..._at_home.com> wrote:
> On May 14, 9:34 am, KT <kerr.t..._at_gmail.com> wrote:
>
>
>
> > Hi All,
>
> > In my rc script, I have su - oracle to run
> > /var/opt/oracle/product/10.2.0/db_1/bin/lsnrctl
>
> > However, it fails with the following:
> > ld.so.1: /var/opt/oracle/product/10.2.0/db_1/bin/lsnrctl: fatal:
> > libclntsh.so.10.1: open failed: No such file or directory
>
> > The cause is that the env var
> > LD_LIBRARY_PATH=/var/opt/oracle/product/10.2.0/db_1/lib was stripped
> > by the su process. According to the su man page:
> > " Variables with LD_ prefix are removed for security reasons.
> > Thus, su bin will not retain previously exported variables
> > with LD_ prefix while becoming user bin (bin used as example
> > previously)"
>
> > How do I make Solaris 8 su to keep the LD_LIBRARY_PATH setting or hard
> > code this setting into Oracle configuration file so that lsnrctl will
> > not fail?
>
> > Thanks,
> > Kerr
>
> I'm not on Solaris, but I notice in my dbstart, it is saving whatever
> LD_LIBRARY_PATH is sent through, then setting it's own, based on $
> {ORACLE_HOME}/lib.  So what I ran into was it wasn't picking up the
> ORACLE_HOME properly with an su - , I had to pass that in explicitly
> as a parameter to dbstart.

Correction: Taking a fresh look at this (been more than a year!), it is setting the listener home based entirely on the first parameter passed into dbstart. So if you don't do that, you should get an error message about it. This makes some kind of sense, as you can use the listener for various db's and versions, and recent versions negotiate with the listener to be heard when they start up, which may not be in the system startup at all, and may look at different homes from oratab. Assuming you have the same dbstart I do, which I assume because I see notations about solaris in there. But mine required editing because it seems to have some other wrong assumptions about what shell features are available - in stuff about sqldba!?.

Watch out for the spelling of the listener home environment variable in there, too.

jg

--
_at_home.com is bogus.
“Somebody comes up with a wild idea, and then they all pounce on it
and kick you to death, and then you start off on another silly idea.”
http://www.bloomberg.com/apps/news?pid=20601087&sid=afrdATVXPEAk&refer=worldwide
Received on Thu May 14 2009 - 12:39:43 CDT

Original text of this message