You are not logged in.
Pages: 1
I have written a file that sets some variables for my oracle 10g instant client.
file: /etc/profile.d/oracle-instant-client.sh
export ORACLE_HOME=/usr/lib/oracle/10.1.0.3/client
export LD_LIBRARY_PATH=/usr/lib/oracle/10.1.0.3/client/libNow this works for a normal user but when using "su" the LD_LIBRARY_PATH disappears. Why is this?
Offline
use
su -mman su
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
I don't think the preserve parent shell environment is what he needs.
I think even if he does use this, it won't work.
If I'm not mistaken, LD_LIBRARY_PATH will never be inherited by subshells. This has to do with the suid bit on terms, keeping a well known exploit from occuring.
I think that's the case here...
sol'n? you got me...
I'd stick that library path in "/etc/ld.so.conf" and be done with it. I don't know if that's what you need though.
Offline
Yeah thanks. Sticking it in /etc/ld.so.conf worked great. I need it to get oracle instant client sqlplus to work.
Offline
When I first read your post, I scratched my head for a second. I remembered for some reason trying the same thing years ago. I soon realized you can't, unless you remove the suid bit I think.
Offline
That's right, as a security thing, suid binaries ignore LD_LIBRARY_PATH. That way sneaky users can't add their own libraries and have root execute them.
I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal
Offline
I had to hack my way around this a while ago. What I ended up doing was setting LD_LIBRARY_PATH_PROFILE="$LD_LIBRARY_PATH" in .bash_profile, then LD_LIBRARY_PATH="$LD_LIBRARY_PATH_PROFILE" in .bashrc. This worked like charm as long as I started X from the console. When I deployed a display manager I had to include the first assignment in .xinitrc as well.
Would it be a good idea if /etc/profile set LD_LIBRARY_PATH_PROFILE after sourcing all the profile.d scripts? Then all the user would have to do is restore LD_LIBRARY_PATH in .bashrc, it could even be in the default rc, just not for root.
All of your mips are belong to us!!
Offline
Pages: 1