Re: [Ssh-sftp-perl-users] Net::SSH::Perl --Unequal Access
Brought to you by:
dbrobins
From: Pierce, S. <Sea...@ar...> - 2011-11-08 16:42:15
|
Oops, I forgot to send an update. I don't know the root cause but unsetting SSH_AUTH_SOCK and export SSH_AUTH_SOCK in the script environment solved the problem and engineers are happy again. On to the next problem. -Sean -----Original Message----- From: Pierce, Sean Sent: Wednesday, November 02, 2011 6:45 PM To: Pierce, Sean; ni...@sy... Cc: ssh...@li... Subject: RE: [Ssh-sftp-perl-users] Net::SSH::Perl --Unequal Access A small break through. The issue is associate with the ssh-agent started on login. Users with early/existing ssh-agent do not have a problem while those with more recent ssh-agent processes have the problem. This is what users see when they login: * keychain 2.7.0 ~ http://www.funtoo.org * Found existing ssh-agent: 7228 * Known ssh key: /export/home/name/.ssh/id_rsa * Known ssh key: /export/home/name/.ssh/id_dsa When the agent is killed the script runs successfully. The system profile provides this line to each user on login: eval `keychain --eval --agents ssh id_rsa id_dsa` Which instantiates these variables: SSH_AUTH_SOCK=/tmp/ssh-ZISL8111/agent.8111; export SSH_AUTH_SOCK; SSH_AGENT_PID=8112; export SSH_AGENT_PID; Nothing --should-- have changed in this area but I need to verify that fully. Either something changed or this is occasionally interfering with Net::SSH::Perl. If something did change (ssh keys, key passwd or permissions) should that effect Net::SSH::Perl module location?? I hope these are unrelated areas. -Sean -----Original Message----- From: Pierce, Sean Sent: Wednesday, November 02, 2011 6:17 PM To: 'ni...@sy...' Cc: ssh...@li... Subject: RE: [Ssh-sftp-perl-users] Net::SSH::Perl --Unequal Access Hi Nigel. That was my first thought but I have not been able to find any differences in the environment. The script is in a shared directory and is executed from the directory or via full path. This system is freshly built and the user accounts largely consistent. I have two clean users with the same bash environments (no .profile) in which one successfully executes the script while the other does not. Maddening! -Sean -----Original Message----- From: Nigel Reed [mailto:ni...@sy...] Sent: Wednesday, November 02, 2011 5:20 PM To: Pierce, Sean Subject: Re: [Ssh-sftp-perl-users] Net::SSH::Perl --Unequal Access How are you invoking your script? From what I read on that link, it looks like the FindBin module might be causing your issues. Are you able to copy the .profile .bashrc .bash_profile and any other startup files to one of the affected users and see if that resolves the problem? If so you know it's something in the environment. Pierce, Sean wrote: > Odd one here. > For a shared Perl tool some users can execute while others cannot. The > error is in finding Net_SSH_PERL modules. Users have the same environment, > permissions perl version and modules. This system is unusual in that > users share SSH keys to provide uniform access to a large range of test > systems. > Here's the error: > Key class 'Net::SSH::Perl::Key::RSA' is unsupported: Base class package > "Class::Loader" is empty. > (Perhaps you need to 'use' the module which defines that package > first, > or make that module available in @INC (@INC contains: > /export/builds/saa_sqa/tools/scaler/../../lib > /opt/csw/lib/perl/site_perl /opt/csw/share/perl/site_perl > /opt/csw/lib/perl/csw /opt/csw/share/perl/csw /opt/csw/lib/perl/5.10.1 > /opt/csw/share/perl/5.10.1 .). > at /opt/csw/share/perl/site_perl/Crypt/RSA.pm line 16 > BEGIN failed--compilation aborted at > /opt/csw/share/perl/site_perl/Crypt/RSA.pm line 16. > Compilation failed in require at > /opt/csw/share/perl/site_perl/Net/SSH/Perl/Key/RSA.pm line 14. > BEGIN failed--compilation aborted at > /opt/csw/share/perl/site_perl/Net/SSH/Perl/Key/RSA.pm line 14. > Compilation failed in require at (eval 164) line 1. > BEGIN failed--compilation aborted at (eval 164) line 1. > > So, there is unequal access to the modules on our infrastructure system. > Modules are found and loaded for some users but not others.?!? > > I found reference to a similar problem here: > http://stackoverflow.com/questions/443493/what-can-make-classloader-fail-where-use-and-new-do-not. > I lack the skills to immediately digest the information and don't have a > test system available to debug without affecting users. > > I'm not sure where to begin to debug this one. Any ideas would be > gratefully accepted. > > Thanks > > -Sean > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1_______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > -- Nigel Reed |