Did you try the solution given at 
http://stackoverflow.com/questions/8633461/how-to-keep-environment-variables-when-using-sudo

From: [email protected] 
[mailto:[email protected]] On Behalf Of 
[email protected]
Sent: 31 March 2015 14:54
To: [email protected]
Subject: RE: super , keep LD_LIBRARY_PATH

setenv not work as well.
________________________________
From: [email protected]<mailto:[email protected]>
To: 
[email protected]<mailto:[email protected]>
Subject: super , keep LD_LIBRARY_PATH
Date: Tue, 31 Mar 2015 08:13:42 +0000
Hi everybody!
    How can I keep the enviromet variable LD_LIBRARY_PATH when I excute a super 
command?

    I have modified /etc/super.tab:
    :global env=PATH,LD_LIBRARY_PATH,PYTHONPATH
    bzytest /root/test admin

    /root/test:
    #!/bin/bash
    export

    I can get PATH, PYTHONPATH kept. But LD_LIBRARY_PATH is not.

    Forgive my bad english.

    Best wishes
    Shuai
    [email protected]<mailto:[email protected]>

-- Ubuntu-devel-discuss mailing list 
[email protected]<mailto:[email protected]>
 Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
-- 
Ubuntu-devel-discuss mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss

Reply via email to