<?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: invoking a different .profile from command line or script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814366#M85141</link>
    <description>Also, try this:&lt;BR /&gt;&lt;BR /&gt;. /path/to/.profile&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 26 Sep 2002 18:52:18 GMT</pubDate>
    <dc:creator>Sean OB_1</dc:creator>
    <dc:date>2002-09-26T18:52:18Z</dc:date>
    <item>
      <title>invoking a different .profile from command line or script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814364#M85139</link>
      <description>This request for assistance is going to sound very simple to someone but I have searched the online man pages, my copy of HP-UX 11i System Administration (by Poniatowski) and the forums for a hint at how to invoke the .profile of another user from the command line or a script while I am logged on as root, so that I can run a SQL script which is dependent on that .profile's enviroment settings. I know it can be done because it says so in the book but the actual command isn't given, I have tried using the exec /path/.profile to no avail. Help please! Thanks in advance to the one who helps me solve this.</description>
      <pubDate>Thu, 26 Sep 2002 18:46:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814364#M85139</guid>
      <dc:creator>Chris Elmore</dc:creator>
      <dc:date>2002-09-26T18:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: invoking a different .profile from command line or script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814365#M85140</link>
      <description>What do you mean when you say to no avail?&lt;BR /&gt;&lt;BR /&gt;It doesn't run?  Or the vars aren't set? etc.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Sep 2002 18:50:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814365#M85140</guid>
      <dc:creator>Sean OB_1</dc:creator>
      <dc:date>2002-09-26T18:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: invoking a different .profile from command line or script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814366#M85141</link>
      <description>Also, try this:&lt;BR /&gt;&lt;BR /&gt;. /path/to/.profile&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Sep 2002 18:52:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814366#M85141</guid>
      <dc:creator>Sean OB_1</dc:creator>
      <dc:date>2002-09-26T18:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: invoking a different .profile from command line or script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814367#M85142</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can simply dot in the users profile as root:&lt;BR /&gt;&lt;BR /&gt;. /home/users/somebody/.profile&lt;BR /&gt;&lt;BR /&gt;This will pickup the environment for that user.  Probably not the safest and most secure thing to do.  You can also use 'su -' to pick up the environment of the user:&lt;BR /&gt;&lt;BR /&gt;su - somebody -c '/usr/bin/dosomething'&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Sep 2002 18:52:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814367#M85142</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2002-09-26T18:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: invoking a different .profile from command line or script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814368#M85143</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;The dot_blank_filename syntax already provided is known as "sourcing" the &lt;FILENAME&gt;.  To "source" is to read.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;/FILENAME&gt;</description>
      <pubDate>Thu, 26 Sep 2002 19:10:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814368#M85143</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-09-26T19:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: invoking a different .profile from command line or script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814369#M85144</link>
      <description>Even though the following will work:&lt;BR /&gt;  . /path/to/.profile&lt;BR /&gt;&lt;BR /&gt;I would consider this to be a BIG security problem.  The user could then edit the .profile and add any shell code they wanted to run as root and the next time you run your script or that cronjob kicks off... you just gave root access to your system by this user.&lt;BR /&gt;&lt;BR /&gt;I would suggest using the "su - somebody -c '/usr/bin/dosomething'" method that John suggested.&lt;BR /&gt;&lt;BR /&gt; -OR-&lt;BR /&gt;&lt;BR /&gt;Create your own file with the environment variables you need setup that you can source when you need it.  At least this way only root can edit the file.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Sep 2002 19:18:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814369#M85144</guid>
      <dc:creator>Tony Contratto</dc:creator>
      <dc:date>2002-09-26T19:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: invoking a different .profile from command line or script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814370#M85145</link>
      <description>Hello Chris !&lt;BR /&gt;&lt;BR /&gt;This is slightly off-topic, but you may give it some thought.&lt;BR /&gt;&lt;BR /&gt;When working as an administrator, I've become accustomed to grouping common application profiles in an /env/ directory. The specific profiles are owned by root and readable by anyone, and the user profiles then 'source' /env/.oracle or /env/.openview, or whatever.&lt;BR /&gt;&lt;BR /&gt;It makes it easier to migrate - say, part of the userbase to a new oracle release, and there's less of an administration hassle, in the end....&lt;BR /&gt;&lt;BR /&gt;-rg-</description>
      <pubDate>Mon, 30 Sep 2002 16:07:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/invoking-a-different-profile-from-command-line-or-script/m-p/2814370#M85145</guid>
      <dc:creator>Roger Crettol</dc:creator>
      <dc:date>2002-09-30T16:07:07Z</dc:date>
    </item>
  </channel>
</rss>

