Greetings, i'm currently having issues in successfully executing a script from one server to other, and i'm cracking my nut in understanding why. Let's get started with the default info:
Server A:
briozzo@A:/home/briozzo $ uname -a
HP-UX A B.11.31 U ia64 2787251109 unlimited-user license
briozzo@A:/home/briozzo $ sudo -V
Sudo version 1.6.8p12
Server B:
briozzo@B:/bilala/data001/scripts $ uname -a
HP-UX B B.11.11 U 9000/800 3196149708 unlimited-user license
briozzo@uxwspr78:/bilala/data001/scripts $ sudo -V
Sudo version 1.6.6
----------------------------------------
So, i've setup ssh keys and will be able to execute commands from Server A to Server B:
ssh briozzo@B hostname
B
Now, in server B there's a script (IBM Cognos related) that i will normally manually execute with my user and it will work without issues. But when i try to remotelly execute from server A, that's when the problems begin:
briozzo@A:/home/briozzo $ ssh briozzo@B SCRIPT
Beginning Cube Build
/usr/lib/dld.sl: Can't find path for shared library: libxerces-c1_5_2_7_4_0.sl
/usr/lib/dld.sl: No such file or directory
/bilala/data001/scripts/build_c10_cro_is_cube.test[10]: 22079 Abort(coredump)
When i first found this error on server B, it was due lack of a variable declaration, i set that variable on B's .profile and it solved itself.
Questions then arise:
1) When doing ssh user@server command , do you inherit the previous user env variables or are the user@server ones loaded when executing the command?
2) If the inherit option is true, then i have already tried to mirror the same .profile in both servers, won't work (get the shared library path error). Do i need to declare something else here?
3) If .profile is loaded at the time of remote login, then why am i getting this error?
I'm trying both to understand the big picture and solve the issue, so any inputs will be apreciated.
Regards