<?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 Scripting question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3042139#M811900</link>
    <description>How can I execute a script as another user while logged in as root?  I need to be able to do this without the system asking me for that user's password.  Any help is appreciated.</description>
    <pubDate>Wed, 06 Aug 2003 02:15:23 GMT</pubDate>
    <dc:creator>TheJuiceman</dc:creator>
    <dc:date>2003-08-06T02:15:23Z</dc:date>
    <item>
      <title>Scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3042139#M811900</link>
      <description>How can I execute a script as another user while logged in as root?  I need to be able to do this without the system asking me for that user's password.  Any help is appreciated.</description>
      <pubDate>Wed, 06 Aug 2003 02:15:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3042139#M811900</guid>
      <dc:creator>TheJuiceman</dc:creator>
      <dc:date>2003-08-06T02:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3042140#M811901</link>
      <description>well you can used su -c .&lt;BR /&gt;&lt;BR /&gt;Example : let say the user script call find_file.sh&lt;BR /&gt;&lt;BR /&gt;so :&lt;BR /&gt;&lt;BR /&gt; su mb -c "/home/find_file.sh"&lt;BR /&gt;&lt;BR /&gt;hope this help.</description>
      <pubDate>Wed, 06 Aug 2003 02:20:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3042140#M811901</guid>
      <dc:creator>malay boy</dc:creator>
      <dc:date>2003-08-06T02:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3042141#M811902</link>
      <description>Well if your root, you can use any account. Typically you use:&lt;BR /&gt;&lt;BR /&gt;su - account -c "command"&lt;BR /&gt;&lt;BR /&gt;Using this example as root, you won't need a password.</description>
      <pubDate>Wed, 06 Aug 2003 02:20:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3042141#M811902</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2003-08-06T02:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3042142#M811903</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I guess the following should work:&lt;BR /&gt;# su - &lt;USERNAME&gt; -c "/fullpath/scriptname"&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Con&lt;/USERNAME&gt;</description>
      <pubDate>Wed, 06 Aug 2003 02:22:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3042142#M811903</guid>
      <dc:creator>Con O'Kelly</dc:creator>
      <dc:date>2003-08-06T02:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3042143#M811904</link>
      <description>If you login as root and use "su", system will not ask for a password, simple issue the following to test and see:&lt;BR /&gt;# su - &lt;USER_NAME&gt; -c date&lt;BR /&gt;&lt;BR /&gt;&lt;/USER_NAME&gt;</description>
      <pubDate>Wed, 06 Aug 2003 02:41:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3042143#M811904</guid>
      <dc:creator>twang</dc:creator>
      <dc:date>2003-08-06T02:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3042144#M811905</link>
      <description>I know this is already sorted, but just another possibility to throw in there...&lt;BR /&gt;&lt;BR /&gt;If its a particular user, you could set the owner of the file to the user you want to run it as, and then set the setuid bit, so it will run as the user its owned by.  Do this with chmod +s &lt;FILE&gt;.&lt;BR /&gt;&lt;BR /&gt;Note this can pose a bit of a security risk but its an alternative to the su -c everyone else has!&lt;BR /&gt;&lt;BR /&gt;Kev.&lt;/FILE&gt;</description>
      <pubDate>Wed, 06 Aug 2003 07:35:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/3042144#M811905</guid>
      <dc:creator>Kevin O'Donovan</dc:creator>
      <dc:date>2003-08-06T07:35:10Z</dc:date>
    </item>
  </channel>
</rss>

