<?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: HPUX in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2776000#M942771</link>
    <description>One tiny point about how UNIX works:  even though script A is owned by user A, it's not necessary for root to "become" user A in order to run script A.&lt;BR /&gt;&lt;BR /&gt;If the permissions are set correctly, root has the potential to run anything.  (Now for security reasons, you may not *want* root to run it, but that's another story.)&lt;BR /&gt;&lt;BR /&gt;For example, if script A is like this (ls -l scriptA):&lt;BR /&gt;&lt;BR /&gt;-rwxr-xr-x userA users .... scriptA&lt;BR /&gt;&lt;BR /&gt;root can run the script.  It will be run as root, though.  The command to get it to look like the above example would be (done as root or as userA):&lt;BR /&gt;&lt;BR /&gt;chmod 755 scriptA&lt;BR /&gt;&lt;BR /&gt;(If you've never seen it, the chmod command also has a "symbolic" mode that makes it much easier to remember.)&lt;BR /&gt;&lt;BR /&gt;Sorry if this was all old news.  I was going on the comment in your forums profile.  :)&lt;BR /&gt;&lt;BR /&gt;--Misa</description>
    <pubDate>Wed, 31 Jul 2002 17:35:05 GMT</pubDate>
    <dc:creator>Misa</dc:creator>
    <dc:date>2002-07-31T17:35:05Z</dc:date>
    <item>
      <title>HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775991#M942762</link>
      <description>I have three scripts, script A owned by user A and script B owned by user B. How can root execute these scripts as the owner.</description>
      <pubDate>Tue, 30 Jul 2002 20:45:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775991#M942762</guid>
      <dc:creator>Raymond Fournier</dc:creator>
      <dc:date>2002-07-30T20:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775992#M942763</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I think you have to play with CHMOD/CHOWN command&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Harry</description>
      <pubDate>Tue, 30 Jul 2002 23:12:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775992#M942763</guid>
      <dc:creator>harry_7</dc:creator>
      <dc:date>2002-07-30T23:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775993#M942764</link>
      <description>Root can use the su command to switch user. Man su for details. Note that the effective UID is changed not the UID.&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Jul 2002 14:33:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775993#M942764</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-07-31T14:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775994#M942765</link>
      <description>Hi Raymond,&lt;BR /&gt;&lt;BR /&gt;Try with:&lt;BR /&gt;&lt;BR /&gt;su - userb -c "/path/yourscriptname"&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Wed, 31 Jul 2002 14:33:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775994#M942765</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-07-31T14:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775995#M942766</link>
      <description>When I want root to execute scripts as my oracle user I do:&lt;BR /&gt;&lt;BR /&gt;su oracle -c "full_path_and_script parameters"&lt;BR /&gt;&lt;BR /&gt;Jeanine</description>
      <pubDate>Wed, 31 Jul 2002 14:34:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775995#M942766</guid>
      <dc:creator>Jeanine Kone</dc:creator>
      <dc:date>2002-07-31T14:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775996#M942767</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;su - &lt;UID&gt; -c "script path"&lt;BR /&gt;&lt;BR /&gt;regds&lt;/UID&gt;</description>
      <pubDate>Wed, 31 Jul 2002 14:42:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775996#M942767</guid>
      <dc:creator>V. V. Ravi Kumar_1</dc:creator>
      <dc:date>2002-07-31T14:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775997#M942768</link>
      <description>Root as user A&lt;BR /&gt;&lt;BR /&gt;# su - A -c full_path_name_of_user_A_script&lt;BR /&gt;&lt;BR /&gt;And root as user B:&lt;BR /&gt;&lt;BR /&gt;# su - B -c full_path_name_of_user_B_script&lt;BR /&gt;&lt;BR /&gt;Hai</description>
      <pubDate>Wed, 31 Jul 2002 14:56:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775997#M942768</guid>
      <dc:creator>Hai Nguyen_1</dc:creator>
      <dc:date>2002-07-31T14:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775998#M942769</link>
      <description>How about using the file permissions set userid options - &lt;BR /&gt;&lt;BR /&gt;For example create a script called say ownerx with the line "touch fish".&lt;BR /&gt;&lt;BR /&gt;Now set the owner of the script to UserA (chown userA ownerx).&lt;BR /&gt;&lt;BR /&gt;Now set the permissions to 4700 (chmod 4700 ownerx).&lt;BR /&gt;&lt;BR /&gt;Now as root run the script ownerx and then look at the owner of the file "fish" and it should be UserA.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Jul 2002 15:10:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775998#M942769</guid>
      <dc:creator>Nick Wickens</dc:creator>
      <dc:date>2002-07-31T15:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775999#M942770</link>
      <description>You do need to be aware of the problem of using su - username as opposed to su username (no dash). The dash says user username's .profile so that all environment variables are set. They may be a very good thing but if these scripts are run in a non-interactive environment, they will almost ceratinly fail. The .profile usually contain commands to query stdin's terminal or to write to it (e.g. tset, stty, tabs, ...). The best solution is to create a file (e.g. /usr/local/bin/oraenv.sh) that sets and exports any needed env vars and then both your scripts AND username's .profile should source this file. There must be no exit or return statements in this file.&lt;BR /&gt;&lt;BR /&gt;. /usr/local/bin/oraenv.sh&lt;BR /&gt;&lt;BR /&gt;You then do an su username and your script runs as expected.&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Jul 2002 15:22:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2775999#M942770</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-07-31T15:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2776000#M942771</link>
      <description>One tiny point about how UNIX works:  even though script A is owned by user A, it's not necessary for root to "become" user A in order to run script A.&lt;BR /&gt;&lt;BR /&gt;If the permissions are set correctly, root has the potential to run anything.  (Now for security reasons, you may not *want* root to run it, but that's another story.)&lt;BR /&gt;&lt;BR /&gt;For example, if script A is like this (ls -l scriptA):&lt;BR /&gt;&lt;BR /&gt;-rwxr-xr-x userA users .... scriptA&lt;BR /&gt;&lt;BR /&gt;root can run the script.  It will be run as root, though.  The command to get it to look like the above example would be (done as root or as userA):&lt;BR /&gt;&lt;BR /&gt;chmod 755 scriptA&lt;BR /&gt;&lt;BR /&gt;(If you've never seen it, the chmod command also has a "symbolic" mode that makes it much easier to remember.)&lt;BR /&gt;&lt;BR /&gt;Sorry if this was all old news.  I was going on the comment in your forums profile.  :)&lt;BR /&gt;&lt;BR /&gt;--Misa</description>
      <pubDate>Wed, 31 Jul 2002 17:35:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux/m-p/2776000#M942771</guid>
      <dc:creator>Misa</dc:creator>
      <dc:date>2002-07-31T17:35:05Z</dc:date>
    </item>
  </channel>
</rss>

