<?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: Scripting question from a beginner in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439119#M6598</link>
    <description>I worked at a place that had a 'c' program that changed to root, then ran mount for the purpose of mounting a floppy diskette.  Any user could run it.&lt;BR /&gt;&lt;BR /&gt;It did not take long for a user to figure out how to abuse the current path setting and the current field seperator variable (SunOS), to get a root shell out of the program.&lt;BR /&gt;&lt;BR /&gt;It is dangerous, and it's hard to think of every situation that puts you at risk.&lt;BR /&gt;</description>
    <pubDate>Thu, 24 Aug 2000 11:51:29 GMT</pubDate>
    <dc:creator>Fred Martin_1</dc:creator>
    <dc:date>2000-08-24T11:51:29Z</dc:date>
    <item>
      <title>Scripting question from a beginner</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439111#M6590</link>
      <description>I am trying to kill users pids inside of a script.  I need to be root in order to do this.  I am using the su - root -c , but it is asking for a password.  I do not want to have to enter a password as I need this script to run without operator intervention.  Any suggestions will be appreciated.</description>
      <pubDate>Wed, 23 Aug 2000 14:40:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439111#M6590</guid>
      <dc:creator>Matt Szary</dc:creator>
      <dc:date>2000-08-23T14:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question from a beginner</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439112#M6591</link>
      <description>Kim,&lt;BR /&gt;&lt;BR /&gt;That's pretty dangerous, as the script will allow you to automatically kill pids without authentication....assuming anyone can run the script.&lt;BR /&gt;&lt;BR /&gt;However, if you must do this, try using sudo and making sure you have assigned the correct priviledges and permissions. ie. make sure that the script is only executable by those who need to use it and they have the appropriate permissions in sudoers.&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;&lt;BR /&gt;--Scott&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Aug 2000 14:43:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439112#M6591</guid>
      <dc:creator>Scott D. Allen</dc:creator>
      <dc:date>2000-08-23T14:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question from a beginner</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439113#M6592</link>
      <description>Kim,&lt;BR /&gt;&lt;BR /&gt;That's pretty dangerous, as the script will allow you to automatically kill pids without authentication....assuming anyone can run the script.&lt;BR /&gt;&lt;BR /&gt;However, if you must do this, try using sudo and making sure you have assigned the correct priviledges and permissions. ie. make sure that the script is only executable by those who need to use it and they have the appropriate permissions in sudoers.&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;&lt;BR /&gt;--Scott&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Aug 2000 14:44:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439113#M6592</guid>
      <dc:creator>Scott D. Allen</dc:creator>
      <dc:date>2000-08-23T14:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question from a beginner</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439114#M6593</link>
      <description>Start the script as root. They were discution in this forum about providing the password via script.&lt;BR /&gt;You can use sudo for a specific user.&lt;BR /&gt;Do a search in forum for sudo. You'll get the web site where to download it from, instruction how to configurew it.&lt;BR /&gt;As a remark, for using the kill command for your own processes you do not need to be root. I mean user1, can kill the processes under user1 ownership. But user1 need root (or sudo) to kill the processes that belongs with user2.</description>
      <pubDate>Wed, 23 Aug 2000 14:46:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439114#M6593</guid>
      <dc:creator>Antoanetta Naghiu</dc:creator>
      <dc:date>2000-08-23T14:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question from a beginner</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439115#M6594</link>
      <description>That is dangerous! The root account should be used exclusively for this purpose. I would be leary of having a user become root to do this. sudo would be a great tool for doing this but I would restrict who has the sudo rights to become the root user. If you put sudo on and anybody can become root, then anyone can do the kills.</description>
      <pubDate>Wed, 23 Aug 2000 14:47:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439115#M6594</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2000-08-23T14:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question from a beginner</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439116#M6595</link>
      <description>I agree with Scott, the only safe way I know to do this is to use sudo, go at the &lt;BR /&gt;Software Porting And Archive Centre For HP-UX &lt;BR /&gt;&lt;BR /&gt;And download a copy&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;Victor</description>
      <pubDate>Wed, 23 Aug 2000 14:48:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439116#M6595</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2000-08-23T14:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question from a beginner</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439117#M6596</link>
      <description>If this must be done, here is a command line that can be used:&lt;BR /&gt;&lt;BR /&gt;ps -ef | grep 'x' | awk '{ system( "kill " $2) }'&lt;BR /&gt;&lt;BR /&gt;The 'x' is the placeholder for whatever you would want to grep for.</description>
      <pubDate>Wed, 23 Aug 2000 14:50:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439117#M6596</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2000-08-23T14:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question from a beginner</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439118#M6597</link>
      <description>Check the attached script and also this, make a file, you must be root to do this:&lt;BR /&gt;ee=`ps -e|grep (user process)|grep "?"|cut -c2-6`&lt;BR /&gt;kill -9 $ee</description>
      <pubDate>Wed, 23 Aug 2000 15:00:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439118#M6597</guid>
      <dc:creator>CHRIS_ANORUO</dc:creator>
      <dc:date>2000-08-23T15:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question from a beginner</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439119#M6598</link>
      <description>I worked at a place that had a 'c' program that changed to root, then ran mount for the purpose of mounting a floppy diskette.  Any user could run it.&lt;BR /&gt;&lt;BR /&gt;It did not take long for a user to figure out how to abuse the current path setting and the current field seperator variable (SunOS), to get a root shell out of the program.&lt;BR /&gt;&lt;BR /&gt;It is dangerous, and it's hard to think of every situation that puts you at risk.&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Aug 2000 11:51:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439119#M6598</guid>
      <dc:creator>Fred Martin_1</dc:creator>
      <dc:date>2000-08-24T11:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting question from a beginner</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439120#M6599</link>
      <description>I have decided to go for the safest choice.  I will download the sudo software and configure.  Thank you all for your assistance</description>
      <pubDate>Thu, 24 Aug 2000 14:56:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question-from-a-beginner/m-p/2439120#M6599</guid>
      <dc:creator>Matt Szary</dc:creator>
      <dc:date>2000-08-24T14:56:37Z</dc:date>
    </item>
  </channel>
</rss>

