<?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: su to root in a script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795350#M80828</link>
    <description>Hi&lt;BR /&gt;I agrree with Clay, this is better to do as root user. If uou add root to the DBA group (recommended) you can shut down Oracle as root user too.</description>
    <pubDate>Wed, 28 Aug 2002 08:54:20 GMT</pubDate>
    <dc:creator>Leif Halvarsson_2</dc:creator>
    <dc:date>2002-08-28T08:54:20Z</dc:date>
    <item>
      <title>su to root in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795343#M80821</link>
      <description>Can anyone tell me how to su to root in a script?  I have a oracle script and want to shutdown my service guard package (which is oracle) but cannot find the right syntax for su to root to shutdown my package&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 27 Aug 2002 22:03:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795343#M80821</guid>
      <dc:creator>Morris Makuch</dc:creator>
      <dc:date>2002-08-27T22:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: su to root in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795344#M80822</link>
      <description>Oracle is not my area of expertise, but if your running a script as oracle and you have to su to root, then a password or setuid wrapper has to be used. You could also consider using 'sudo' You can get it from here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.6/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.6/&lt;/A&gt;</description>
      <pubDate>Tue, 27 Aug 2002 22:16:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795344#M80822</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2002-08-27T22:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: su to root in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795345#M80823</link>
      <description>You will have an easier time of this and not be prompted for a passwd if you turn the world around and run your script as root and su to oracle. You do not want to do a su - oracle but rather a plain su oracle command. You should load all the environment vars from a sourced file that sets and exports these variable via a command like . /usr/local/bin/oraenv.sh. THere must be no exit or return statements in this sourced file. The smart way to do this is to also source this same file in oracle's .profile. You want to avoid any commands in your su oracle which expect an interactive environment which the normal .profile does.</description>
      <pubDate>Wed, 28 Aug 2002 00:49:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795345#M80823</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-08-28T00:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: su to root in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795346#M80824</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I think you can achive what you are trying to achive using  sudo in better way.&lt;BR /&gt;&lt;BR /&gt;-Niraj</description>
      <pubDate>Wed, 28 Aug 2002 03:56:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795346#M80824</guid>
      <dc:creator>Niraj Kumar Verma</dc:creator>
      <dc:date>2002-08-28T03:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: su to root in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795347#M80825</link>
      <description>If you have ssh installed, enter&lt;BR /&gt;ssh HOST -l root "MY COMMAND"&lt;BR /&gt;&lt;BR /&gt;This also works inside scripts. For each non-root user allowed to use your script you have to store the public ssh key in root's ssh directory (/.ssh2) .</description>
      <pubDate>Wed, 28 Aug 2002 06:41:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795347#M80825</guid>
      <dc:creator>Ulrich Deiters</dc:creator>
      <dc:date>2002-08-28T06:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: su to root in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795348#M80826</link>
      <description>running a comand as root is one of the regular questions.&lt;BR /&gt;check this link&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x4b0857bd90a9d611abdb0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x4b0857bd90a9d611abdb0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Jean-Luc</description>
      <pubDate>Wed, 28 Aug 2002 06:49:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795348#M80826</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2002-08-28T06:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: su to root in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795349#M80827</link>
      <description>I would also settle for sudo.  I was wondering if setprivgrp(1M) might be an option.  Perhaps you can specifiy that oracle can change his ruid to root.  Never tried it.  Anyone else ?</description>
      <pubDate>Wed, 28 Aug 2002 08:45:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795349#M80827</guid>
      <dc:creator>Systeemingenieurs Infoc</dc:creator>
      <dc:date>2002-08-28T08:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: su to root in a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795350#M80828</link>
      <description>Hi&lt;BR /&gt;I agrree with Clay, this is better to do as root user. If uou add root to the DBA group (recommended) you can shut down Oracle as root user too.</description>
      <pubDate>Wed, 28 Aug 2002 08:54:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/su-to-root-in-a-script/m-p/2795350#M80828</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2002-08-28T08:54:20Z</dc:date>
    </item>
  </channel>
</rss>

