<?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: need to execute a script as root in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-execute-a-script-as-root/m-p/4993963#M741253</link>
    <description>Hi Bill,&lt;BR /&gt;sudo is the good solution.&lt;BR /&gt;&lt;BR /&gt;To download it:&lt;BR /&gt;from the Porting And Archive Centre for HP-UX&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.8p9/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.8p9/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.courtesan.com/sudo/download.html" target="_blank"&gt;http://www.courtesan.com/sudo/download.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;wikipedia:&lt;BR /&gt;&lt;A href="http://en.wikipedia.org/wiki/Sudo" target="_blank"&gt;http://en.wikipedia.org/wiki/Sudo&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Sudo Manual:&lt;BR /&gt;&lt;A href="http://www.courtesan.com/sudo/man/sudo.html" target="_blank"&gt;http://www.courtesan.com/sudo/man/sudo.html&lt;/A&gt;&lt;BR /&gt;Sudo main page:&lt;BR /&gt;&lt;A href="http://www.courtesan.com/sudo/" target="_blank"&gt;http://www.courtesan.com/sudo/&lt;/A&gt;</description>
    <pubDate>Sat, 29 Jul 2006 00:09:57 GMT</pubDate>
    <dc:creator>inventsekar_1</dc:creator>
    <dc:date>2006-07-29T00:09:57Z</dc:date>
    <item>
      <title>need to execute a script as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-execute-a-script-as-root/m-p/4993961#M741251</link>
      <description>Is there some way the I could allow a non-root user to execute a script and have the script executed as root?&lt;BR /&gt;&lt;BR /&gt;I have a script that works if I run it as root but not as another user.  &lt;BR /&gt;&lt;BR /&gt;The real script actually runs on another server so a solution that would allow a non-root user on system1 to 'remsh -l root system2 script.sh' would be just as good.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Fri, 28 Jul 2006 22:35:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-execute-a-script-as-root/m-p/4993961#M741251</guid>
      <dc:creator>Bill Costigan</dc:creator>
      <dc:date>2006-07-28T22:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: need to execute a script as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-execute-a-script-as-root/m-p/4993962#M741252</link>
      <description>I would never allow them on any box that I am responsible for but yes, you can set the setuid bit on a script and if the file is owned by root it can execute as root.&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;chown root dangerous.sh&lt;BR /&gt;chmod 4550 dangerous.sh&lt;BR /&gt;&lt;BR /&gt;You have to be very careful when such scripts are crafted because they are a security hole one could drive a truck through.&lt;BR /&gt;&lt;BR /&gt;A much better alternative is to non set the setuid bit and let the script be run under sudo -- also sudo will automatically log the activity. You still need to be careful than no one can alter the script. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.8p9/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.8p9/&lt;/A&gt;</description>
      <pubDate>Fri, 28 Jul 2006 22:47:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-execute-a-script-as-root/m-p/4993962#M741252</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-07-28T22:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: need to execute a script as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-execute-a-script-as-root/m-p/4993963#M741253</link>
      <description>Hi Bill,&lt;BR /&gt;sudo is the good solution.&lt;BR /&gt;&lt;BR /&gt;To download it:&lt;BR /&gt;from the Porting And Archive Centre for HP-UX&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.8p9/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.8p9/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.courtesan.com/sudo/download.html" target="_blank"&gt;http://www.courtesan.com/sudo/download.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;wikipedia:&lt;BR /&gt;&lt;A href="http://en.wikipedia.org/wiki/Sudo" target="_blank"&gt;http://en.wikipedia.org/wiki/Sudo&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Sudo Manual:&lt;BR /&gt;&lt;A href="http://www.courtesan.com/sudo/man/sudo.html" target="_blank"&gt;http://www.courtesan.com/sudo/man/sudo.html&lt;/A&gt;&lt;BR /&gt;Sudo main page:&lt;BR /&gt;&lt;A href="http://www.courtesan.com/sudo/" target="_blank"&gt;http://www.courtesan.com/sudo/&lt;/A&gt;</description>
      <pubDate>Sat, 29 Jul 2006 00:09:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-execute-a-script-as-root/m-p/4993963#M741253</guid>
      <dc:creator>inventsekar_1</dc:creator>
      <dc:date>2006-07-29T00:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: need to execute a script as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-execute-a-script-as-root/m-p/4993964#M741254</link>
      <description>Hi Bill:&lt;BR /&gt;&lt;BR /&gt;In addition to using 'sudo', in lieu of setting the setuid bit on a script, you can create a C wrapper that holds the setuid setting and simply 'exec's your script.  This is safer than directly running setuid scripts.&lt;BR /&gt;&lt;BR /&gt;In fact, on 11.23 you can control whether or not setuid scripts can be run at all.  (Some flavors of Unix don't allow them under any conditions.)&lt;BR /&gt;&lt;BR /&gt;By default on 11.23, the kernel parameter 'secure_sid_scripts' is set to one (1) which prevents simple setuid scripts from running.  See here for more details:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B2355-60105/secure_sid_scripts.5.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60105/secure_sid_scripts.5.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sat, 29 Jul 2006 07:51:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-execute-a-script-as-root/m-p/4993964#M741254</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-07-29T07:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: need to execute a script as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-to-execute-a-script-as-root/m-p/4993965#M741255</link>
      <description>Thank you all.&lt;BR /&gt;&lt;BR /&gt;I know this is a security hole.  I need to run SAP's brbackup as the oracle user and I need the brbackup to call my script to create volume groups and such.  As it is, brbackup was calling my scripr as the oracle user and that didn't work too well.</description>
      <pubDate>Sat, 29 Jul 2006 09:45:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-to-execute-a-script-as-root/m-p/4993965#M741255</guid>
      <dc:creator>Bill Costigan</dc:creator>
      <dc:date>2006-07-29T09:45:02Z</dc:date>
    </item>
  </channel>
</rss>

