FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 12-17-2010, 08:04 PM
Alexander Farber
 
Default Passing LD_LIBRARY_PATH through sudo

Hello,

I have a CentOS 5.5/64bit VM, where I only have sudo rights:

afarber ALL=(ALL) NOPASSWD: ALL

I'm trying to pass LD_LIBRARY_PATH
through sudo to install DBD::Oracle
( https://rt.cpan.org/Ticket/Display.html?id=63678 )
and have tried using "sudo -E" and also
changing these lines in the stock /etc/sudoers:

Defaults !env_reset
Defaults env_keep = "LD_LIBRARY_PATH
COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR
LS_COLORS MAIL PS1 PS2 QTDIR USERNAME
LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME
LC_NUMERIC
LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS
_XKB_CHARSET XAUTHORITY"

Still my test call fails:

afarber@VM:~> echo $LD_LIBRARY_PATH
/usr/lib/oracle/11.2/client64
afarber@VM:~> sudo -E perl -e 'print $ENV{LD_LIBRARY_PATH}';
afarber@VM:~>
afarber@VM:~> sudo -E perl -e 'print $ENV{HOME}';
/home/afarber

Does anybody please have a suggestion here?

Thank you
Alex
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-17-2010, 09:21 PM
James Pearson
 
Default Passing LD_LIBRARY_PATH through sudo

Alexander Farber wrote:
>
> Still my test call fails:
>
> afarber@VM:~> echo $LD_LIBRARY_PATH
> /usr/lib/oracle/11.2/client64
> afarber@VM:~> sudo -E perl -e 'print $ENV{LD_LIBRARY_PATH}';
> afarber@VM:~>
> afarber@VM:~> sudo -E perl -e 'print $ENV{HOME}';
> /home/afarber
>
> Does anybody please have a suggestion here?

Have you tried:

sudo LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64 perl -e 'print
$ENV{LD_LIBRARY_PATH}'

James Pearson
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-17-2010, 09:41 PM
Alexander Farber
 
Default Passing LD_LIBRARY_PATH through sudo

This one works, thank you
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 05:32 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org