<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: scripts loosing the environment in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103859#M91052</link>
    <description>also - the script is launched from .profile</description>
    <pubDate>Wed, 16 Apr 2008 15:49:56 GMT</pubDate>
    <dc:creator>Mark McDonald_2</dc:creator>
    <dc:date>2008-04-16T15:49:56Z</dc:date>
    <item>
      <title>scripts loosing the environment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103851#M91044</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;We have several boxes mostly(11.11) where the helpdesk users see a menu when they log in.&lt;BR /&gt;&lt;BR /&gt;The main scriptA check the user, exports the variables etc. This calls another scriptB which displays the menu. Script B then calls whichever script is needed depending upon the menu selection.&lt;BR /&gt;&lt;BR /&gt;On a new machine however (11.23) when scriptB calls the final script the last script has lost the variables.&lt;BR /&gt;&lt;BR /&gt;I have an echo at each point in the scripts the variables are set correctly in Script A and Script B, but get lost at the 3rd level&lt;BR /&gt;&lt;BR /&gt;What is happeneing?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Mark</description>
      <pubDate>Wed, 16 Apr 2008 13:42:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103851#M91044</guid>
      <dc:creator>Mark McDonald_2</dc:creator>
      <dc:date>2008-04-16T13:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: scripts loosing the environment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103852#M91045</link>
      <description>I have a script which doesn't work.  What's&lt;BR /&gt;wrong with it?</description>
      <pubDate>Wed, 16 Apr 2008 13:59:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103852#M91045</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-04-16T13:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: scripts loosing the environment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103853#M91046</link>
      <description>Hi Mark:&lt;BR /&gt;&lt;BR /&gt;So, was the new machine established with an identical configuration as far as scripts, directories, permissions and ownerships?&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 16 Apr 2008 14:11:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103853#M91046</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-04-16T14:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: scripts loosing the environment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103854#M91047</link>
      <description>Steven&lt;BR /&gt;&lt;BR /&gt;The script works fine on other machines thanks.... :-/ I was wondering whether something in 11.23 only carries variables down so many new shells are something silly like that.&lt;BR /&gt;&lt;BR /&gt;James&lt;BR /&gt;&lt;BR /&gt;Yes the scripts / directories are the same.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Mark</description>
      <pubDate>Wed, 16 Apr 2008 14:53:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103854#M91047</guid>
      <dc:creator>Mark McDonald_2</dc:creator>
      <dc:date>2008-04-16T14:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: scripts loosing the environment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103855#M91048</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;can you post an extract from your script so that we get a clearer picture?&lt;BR /&gt;&lt;BR /&gt;revert!&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Wed, 16 Apr 2008 15:09:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103855#M91048</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2008-04-16T15:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: scripts loosing the environment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103856#M91049</link>
      <description>Hi (again) Mark:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I was wondering whether something in 11.23 only carries variables down so many new shells are something silly like that.&lt;BR /&gt;&lt;BR /&gt;I don't think that this has anything to due intrinsically with 11.11 vs. 11.23, but rather something with configuration.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Yes the scripts / directories are the same.&lt;BR /&gt;&lt;BR /&gt;Same permissions and ownerships?  Same permissions and ownerships of parent directories (all the way up)?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; On a new machine however (11.23) when scriptB calls the final script the last script has lost the variables.&lt;BR /&gt;&lt;BR /&gt;Does scriptB export what the final script will need?&lt;BR /&gt;&lt;BR /&gt;Do you launch the menu script from a '.profile' or do you define it as the shell program in '/etc/passwd'?  Is this done the same on all systems?&lt;BR /&gt;&lt;BR /&gt;Lastly, if you a performing any 'su' commands, compare your '/etc/default/security' settings on your servers.  In particular, look at settings like 'SU_KEEP_ENV_VARS', 'SU_ROOT_GROUP' and 'SU_DEFAULT_PATH'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 16 Apr 2008 15:18:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103856#M91049</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-04-16T15:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: scripts loosing the environment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103857#M91050</link>
      <description>Hmmm&lt;BR /&gt;&lt;BR /&gt;This is hashed on the box that doesnt work&lt;BR /&gt;&lt;BR /&gt;# Force su to propagate specified unsafe&lt;BR /&gt;# environment variables.&lt;BR /&gt;# SU_KEEP_ENV_VARS=HOME,SHLIB_PATH&lt;BR /&gt;&lt;BR /&gt;ill have a check around the working boxes.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 16 Apr 2008 15:31:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103857#M91050</guid>
      <dc:creator>Mark McDonald_2</dc:creator>
      <dc:date>2008-04-16T15:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: scripts loosing the environment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103858#M91051</link>
      <description>The variable in question is MR_LIB_DIR so this would not be stopped by the security file. &lt;BR /&gt;&lt;BR /&gt;the final script is kicked off via sudo though so I think we are along the right lines.</description>
      <pubDate>Wed, 16 Apr 2008 15:37:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103858#M91051</guid>
      <dc:creator>Mark McDonald_2</dc:creator>
      <dc:date>2008-04-16T15:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: scripts loosing the environment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103859#M91052</link>
      <description>also - the script is launched from .profile</description>
      <pubDate>Wed, 16 Apr 2008 15:49:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103859#M91052</guid>
      <dc:creator>Mark McDonald_2</dc:creator>
      <dc:date>2008-04-16T15:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: scripts loosing the environment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103860#M91053</link>
      <description>Found it.....&lt;BR /&gt;&lt;BR /&gt;This line was missing in the sudoers&lt;BR /&gt;Defaults env_keep+="*"&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 16 Apr 2008 16:29:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103860#M91053</guid>
      <dc:creator>Mark McDonald_2</dc:creator>
      <dc:date>2008-04-16T16:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: scripts loosing the environment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103861#M91054</link>
      <description>&amp;gt; the final script is kicked off via sudo [...]&lt;BR /&gt;&lt;BR /&gt;Doh!  Why didn't I realize that immediately?&lt;BR /&gt;I'm such a dope sometimes.</description>
      <pubDate>Wed, 16 Apr 2008 17:50:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103861#M91054</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-04-16T17:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: scripts loosing the environment</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103862#M91055</link>
      <description>-&amp;gt; I'm such a dope sometimes.&lt;BR /&gt;&lt;BR /&gt;You are....</description>
      <pubDate>Thu, 17 Apr 2008 09:51:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripts-loosing-the-environment/m-p/5103862#M91055</guid>
      <dc:creator>Mark McDonald_2</dc:creator>
      <dc:date>2008-04-17T09:51:39Z</dc:date>
    </item>
  </channel>
</rss>

