<?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: interrupting a script run as root in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660481#M929324</link>
    <description>Actually, giving any script root SUID permission is a big security risk. It is much safer to write an executable to perform the task. Or to use sudo (freeware that can be downloaded).&lt;BR /&gt;&lt;BR /&gt;For now, prevent interrupting the shell script the same way as /etc/profile does it:&lt;BR /&gt;&lt;BR /&gt;trap "" 1 2 3&lt;BR /&gt;&lt;BR /&gt;Make this the first statement after your shell script loader (ie, first line must be #!/usr/bin/sh).  Note: every shell script should start with #!/usr/bin/shell_name</description>
    <pubDate>Fri, 08 Feb 2002 01:18:17 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2002-02-08T01:18:17Z</dc:date>
    <item>
      <title>interrupting a script run as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660477#M929320</link>
      <description>i have to run, as a normal user, a script with the root permission. How can i avoid to enter the root shell if interrupt the execution of the script ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Federico</description>
      <pubDate>Thu, 07 Feb 2002 09:27:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660477#M929320</guid>
      <dc:creator>federico_3</dc:creator>
      <dc:date>2002-02-07T09:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: interrupting a script run as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660478#M929321</link>
      <description>If the script is owned by root with su-id bit on, and others have only execute permission, I guess it should be OK. &lt;BR /&gt;Just be careful not to allow others write permission on the script!</description>
      <pubDate>Thu, 07 Feb 2002 09:31:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660478#M929321</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-02-07T09:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: interrupting a script run as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660479#M929322</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I use restricted SAM for such purposes. Easy menu-system for the user, let them execute with root privileges for restricted commands.&lt;BR /&gt;&lt;BR /&gt;# sam -r&lt;BR /&gt;&lt;BR /&gt;Hope this helps. Regards.&lt;BR /&gt;&lt;BR /&gt;Steven Sim Kok Leong</description>
      <pubDate>Thu, 07 Feb 2002 09:54:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660479#M929322</guid>
      <dc:creator>Steven Sim Kok Leong</dc:creator>
      <dc:date>2002-02-07T09:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: interrupting a script run as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660480#M929323</link>
      <description>Hi Federico,&lt;BR /&gt;&lt;BR /&gt;I believe that when the user breaks out of the script, he will be returned to his shell, not root's.  However, it is good practice to use the trap statement in your shell scripts.  For example:&lt;BR /&gt;&lt;BR /&gt;trap "" 2&lt;BR /&gt;&lt;BR /&gt;This tells the script to ignore signal 2, the interrupt or break signal.  The effect is you can't break out of the script with CTRL-C.&lt;BR /&gt;&lt;BR /&gt;man 1 kill for the most commonly used signals.  kill -l (lowercase letter l) lists all signals.  man sh-posix (or the other shells) for more info.&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Thu, 07 Feb 2002 15:33:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660480#M929323</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-02-07T15:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: interrupting a script run as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660481#M929324</link>
      <description>Actually, giving any script root SUID permission is a big security risk. It is much safer to write an executable to perform the task. Or to use sudo (freeware that can be downloaded).&lt;BR /&gt;&lt;BR /&gt;For now, prevent interrupting the shell script the same way as /etc/profile does it:&lt;BR /&gt;&lt;BR /&gt;trap "" 1 2 3&lt;BR /&gt;&lt;BR /&gt;Make this the first statement after your shell script loader (ie, first line must be #!/usr/bin/sh).  Note: every shell script should start with #!/usr/bin/shell_name</description>
      <pubDate>Fri, 08 Feb 2002 01:18:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660481#M929324</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-02-08T01:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: interrupting a script run as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660482#M929325</link>
      <description>Hello Frederic,&lt;BR /&gt;&lt;BR /&gt;start the last command with "exec" - if that is aborted somehow, there will be no shell "left"...&lt;BR /&gt;&lt;BR /&gt;Just my $0.02,&lt;BR /&gt;Wodisch</description>
      <pubDate>Fri, 08 Feb 2002 07:43:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660482#M929325</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2002-02-08T07:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: interrupting a script run as root</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660483#M929326</link>
      <description>If this is a long-term requirement, wny not investigate 'sudo' (from the HP Porting Centre)? This gives the ability to grant root access for certain Users without compromising security.&lt;BR /&gt;&lt;BR /&gt;Share and Enjoy! Ian</description>
      <pubDate>Fri, 08 Feb 2002 09:27:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/interrupting-a-script-run-as-root/m-p/2660483#M929326</guid>
      <dc:creator>ian Dennison</dc:creator>
      <dc:date>2002-02-08T09:27:57Z</dc:date>
    </item>
  </channel>
</rss>

