We have many legacy csh scripts that connect to our db2 database using "db2 connect to <table>" command. They do NOT use "db2 connect to <table> user <user> using <password>" explicitly, so the connection defaults to the user running the script.
We want to change the db2 connection from the user account running the csh script to a dedicated db2 account (called "dblegacy").
I tried writing a wrapper executable that would load/run as root, and then change account to "dblegacy" before executing the csh scripts. Only problem is Linux (ld.so) removes LD_LIBRARY_PATH environment variable from all scripts/files loaded after setuid() account change to "dblegacy" occurs. And, of course, the csh scripts require shared libraries.
So, I need a way of having "db2 connect to table" use or default to this "dblegacy" account.
LD_LIBRARY_PATH
variable would cause yourcsh(1)
scripts to fail -- if yourcsh(1)
interpreter requires libraries that aren't in the/etc/ld.so.conf
or/etc/ld.so.conf.d/*
list of directories, that directory probably should be in the list.