Go Back   The UNIX and Linux Forums > Operating Systems > HP-UX


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 07-12-2012
Registered User
 
Join Date: Jun 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Remote ssh execution and .profile issues

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:

Code:
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:

Code:
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:

Code:
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

Moderator's Comments:
Please view this code tag video for how to use code tags when posting code and data.

Last edited by vbe; 07-12-2012 at 07:45 AM..
Sponsored Links
    #2  
Old 07-12-2012
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Location: Switzerland - GE
Posts: 4,636
Thanks: 118
Thanked 256 Times in 245 Posts
If I recall:
1) I dont think you read .profile when executing only a command, same behaviour as on local when you use su... (diff between su <user> command and su - <user> command...) there is maybe an option though (so far I was not concerned...)
2) I dont get the point:
if
Quote:
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.
3) Does it work when you remote login using ssh and copied .profile and execute things?
If not, the solution is in the post I just erased (damn...)

Last edited by vbe; 07-12-2012 at 08:07 AM.. Reason: typos (cant believe it its not friday yet!)
Sponsored Links
    #3  
Old 07-12-2012
Registered User
 
Join Date: Jun 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
2) Basically: I copied .profile from server B to A, and tried to execute the script from A to B. Will get that error again.

So, i should create a 'enviroment' file on my .ssh directory? What should i declare there?
    #4  
Old 07-12-2012
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Location: Switzerland - GE
Posts: 4,636
Thanks: 118
Thanked 256 Times in 245 Posts
Sorry for not being reactive enough, I see to have some strange network issues...
Quote:
2) Basically: I copied .profile from server B to A, and tried to execute the script from A to B. Will get that error again.
OK but then what did you mean here:
Quote:
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.
Either it solved (question of reading .profile) or it did not ( ssh needs more to read .profile), have a look at the ssh_config man pages!
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Log remote execution over SSH new0h Security 1 09-28-2011 01:44 PM
Remote command execution uunniixx Shell Programming and Scripting 4 04-02-2009 11:26 PM
Profile execution issue malavm UNIX for Dummies Questions & Answers 1 01-07-2009 05:41 AM
remote execution pascalbout AIX 2 01-03-2006 05:20 AM
remote execution ragmelo Shell Programming and Scripting 5 04-10-2004 02:31 PM



All times are GMT -4. The time now is 11:35 AM.