<?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: Free script Again in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787533#M833992</link>
    <description>Paula,&lt;BR /&gt;&lt;BR /&gt;I know you weren't upset - I was just "not looking a gift horse in the mouth".&lt;BR /&gt;&lt;BR /&gt;Pete</description>
    <pubDate>Fri, 16 Aug 2002 10:00:56 GMT</pubDate>
    <dc:creator>Pete Randall</dc:creator>
    <dc:date>2002-08-16T10:00:56Z</dc:date>
    <item>
      <title>Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787518#M833977</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Got more than one root level user or other system dependant upon the root password.&lt;BR /&gt;&lt;BR /&gt;A little script to monitor root password for a change :-&lt;BR /&gt;&lt;BR /&gt;All donations to 07/11 fund.&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;##################################################&lt;BR /&gt;# Monitor of changes to root login  &lt;BR /&gt;# PJFC 2001&lt;BR /&gt;##################################################&lt;BR /&gt;# Check carried out against $a as defined below &lt;BR /&gt;# 'a' Should be whole of current root entry in /etc/passwd&lt;BR /&gt;# Copy and paste it on the line below.&lt;BR /&gt;a=root:bbtu9S2dwAMWM:0:3:AVRO:/:/sbin/sh&lt;BR /&gt;##################################################&lt;BR /&gt;# Get current root entry line from passwd&lt;BR /&gt;# Use grep ???v to exclude other users like rootaw &lt;BR /&gt;b=`cat /etc/passwd | grep -v gdr | grep -v rootaw | grep root | awk '{print $1}'`&lt;BR /&gt;##################################################&lt;BR /&gt;# Check for new file by comparing dates&lt;BR /&gt;if [[ $a != $b ]] &lt;BR /&gt;then&lt;BR /&gt;##################################################&lt;BR /&gt;# If root entry has changed then warn &lt;BR /&gt;# Mail to desktop&lt;BR /&gt;mailx -s "WARNING - WARNING N0 Root login has changed " paula@avro.co.uk # Mail to phone&lt;BR /&gt;mailx -s "WARNING - WARNING N0 Root login has changed " 07956610410@one2one.net fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Paula&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Aug 2002 07:33:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787518#M833977</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-08-16T07:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787519#M833978</link>
      <description>The bit:-&lt;BR /&gt;&lt;BR /&gt;WARNING - WARNING N0 Root login has changed &lt;BR /&gt;&lt;BR /&gt;N0 (N Zero is a server name)&lt;BR /&gt;&lt;BR /&gt;paula</description>
      <pubDate>Fri, 16 Aug 2002 07:35:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787519#M833978</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-08-16T07:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787520#M833979</link>
      <description>Looks good, need to start monitoring this here.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Hilary&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Aug 2002 08:14:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787520#M833979</guid>
      <dc:creator>BFA6</dc:creator>
      <dc:date>2002-08-16T08:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787521#M833980</link>
      <description>Hi Paula,&lt;BR /&gt;&lt;BR /&gt;Good work!&lt;BR /&gt;&lt;BR /&gt;Only one improvement, try with this in order to solve the problem with users like rootaw:&lt;BR /&gt;# Get current root entry line from passwd &lt;BR /&gt;# Use grep ???v to exclude other users like rootaw &lt;BR /&gt;b=`cat /etc/passwd |  grep "^root:" | awk '{print $1}'` &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Fri, 16 Aug 2002 08:23:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787521#M833980</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-08-16T08:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787522#M833981</link>
      <description>Hi Paula,&lt;BR /&gt;&lt;BR /&gt;I am studying your script and if you only want to check the password and not all the line you can check only the second field in the passwd file with this:&lt;BR /&gt;#!/bin/ksh &lt;BR /&gt;################################################## &lt;BR /&gt;# Monitor of changes to root login &lt;BR /&gt;# PJFC 2001 &lt;BR /&gt;################################################## &lt;BR /&gt;# Check carried out against $a as defined below &lt;BR /&gt;# 'a' Should be whole of current root entry in /etc/passwd &lt;BR /&gt;# Copy and paste it on the line below. &lt;BR /&gt;a=bbtu9S2dwAMWM&lt;BR /&gt;################################################## &lt;BR /&gt;# Get current root entry line from passwd &lt;BR /&gt;# Use grep ???v to exclude other users like rootaw &lt;BR /&gt;b=`cat /etc/passwd |  grep "^root:" | cut -d":" -f2` &lt;BR /&gt;################################################## &lt;BR /&gt;# Check for new file by comparing dates &lt;BR /&gt;if [[ $a != $b ]] &lt;BR /&gt;then &lt;BR /&gt;################################################## &lt;BR /&gt;# If root entry has changed then warn &lt;BR /&gt;# Mail to desktop &lt;BR /&gt;mailx -s "WARNING - WARNING N0 Root login has changed " paula@avro.co.uk # Mail to phone &lt;BR /&gt;mailx -s "WARNING - WARNING N0 Root login has changed " 07956610410@one2one.net fi &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Fri, 16 Aug 2002 08:29:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787522#M833981</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-08-16T08:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787523#M833982</link>
      <description>A suggestion, and a problem&lt;BR /&gt;&lt;BR /&gt;suggestion:  rather than having the root entry line in the file, create another file eg:&lt;BR /&gt;&lt;BR /&gt;/etc/r_pw&lt;BR /&gt;&lt;BR /&gt;with read only access for root, then use &lt;BR /&gt;&lt;BR /&gt;a=`cat /etc/r_pw`&lt;BR /&gt;&lt;BR /&gt;This way, you can have a standard script for use on a number of systems, rather than having to hard code the entry on every one that you run.&lt;BR /&gt;&lt;BR /&gt;problem:  it won't work on a trusted system</description>
      <pubDate>Fri, 16 Aug 2002 08:33:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787523#M833982</guid>
      <dc:creator>Chris Wilshaw</dc:creator>
      <dc:date>2002-08-16T08:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787524#M833983</link>
      <description>Hi Guys/Gals&lt;BR /&gt;&lt;BR /&gt;Yes of couse there are other ways to do/enance somthing.&lt;BR /&gt;&lt;BR /&gt;The script works in its current state.&lt;BR /&gt;&lt;BR /&gt;I was giving away the concept.&lt;BR /&gt;&lt;BR /&gt;Do what you wish with it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;;^)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Fri, 16 Aug 2002 09:03:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787524#M833983</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-08-16T09:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787525#M833984</link>
      <description>Hi Paula,&lt;BR /&gt;&lt;BR /&gt;Sorry, yep the script works fine.&lt;BR /&gt;&lt;BR /&gt;Only ideas;-(&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Fri, 16 Aug 2002 09:13:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787525#M833984</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-08-16T09:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787526#M833985</link>
      <description>Hi Justo&lt;BR /&gt;&lt;BR /&gt;I was not upset, I just thought I would clarify why I placed the idea on the forum.&lt;BR /&gt;&lt;BR /&gt;All comments/enhancements are most welcome.&lt;BR /&gt;&lt;BR /&gt;I am not a scripting GURU but normally I can find a way to do what I want.&lt;BR /&gt;&lt;BR /&gt;;^)&lt;BR /&gt;&lt;BR /&gt;Paula&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Aug 2002 09:27:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787526#M833985</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-08-16T09:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787527#M833986</link>
      <description>Paula,&lt;BR /&gt;&lt;BR /&gt;How about a simple ThankYou with no whining:&lt;BR /&gt;&lt;BR /&gt;Thankyou!&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 16 Aug 2002 09:38:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787527#M833986</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-08-16T09:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787528#M833987</link>
      <description>Hi Pete&lt;BR /&gt;&lt;BR /&gt;I was not at all upset / whining, no was I having a go at anyone.&lt;BR /&gt;&lt;BR /&gt;As I said I was giving the concept away and I am most receptive to suggestions.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;;^)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Fri, 16 Aug 2002 09:46:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787528#M833987</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-08-16T09:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787529#M833988</link>
      <description>Hi Paula,&lt;BR /&gt;&lt;BR /&gt;As Pete tell you, THANK YOU.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Fri, 16 Aug 2002 09:47:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787529#M833988</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-08-16T09:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787530#M833989</link>
      <description>Hi Again,&lt;BR /&gt;&lt;BR /&gt;Another sugestion...&lt;BR /&gt;&lt;BR /&gt;Use the command crypt in order to encrypt your old passwd.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Fri, 16 Aug 2002 09:51:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787530#M833989</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-08-16T09:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787531#M833990</link>
      <description>I was just enjoying this thread to see what the reactions would be. *DO* people actually use this: Yes, What would they change? Many ideas pop up after reading it.&lt;BR /&gt;&lt;BR /&gt;What would happen if /etc/passwd looks like:&lt;BR /&gt;&lt;BR /&gt;xoot:bbtu9S2dwAMWM:0:3:AVRO:/:/sbin/sh&lt;BR /&gt;root:bbtu9S2dwAMWM:1:3:AVRO:/:/sbin/sh&lt;BR /&gt;&lt;BR /&gt;Would it make a system unusable? Or can we just continue as xoot?&lt;BR /&gt;&lt;BR /&gt;FWIW I'm not the one to try out :)&lt;BR /&gt;&lt;BR /&gt;Some thought about general efficiency&lt;BR /&gt;&lt;BR /&gt;*WHY* do people use 'cat file | filter' instead of 'filter &amp;lt; file' ?&lt;BR /&gt;&lt;BR /&gt;It's just an extra unneeded process&lt;BR /&gt;&lt;BR /&gt;b=`grep '^root:.*:0:' /etc/passwd`&lt;BR /&gt;&lt;BR /&gt;just another ??? 0.01 (which will probably just disappear soon)</description>
      <pubDate>Fri, 16 Aug 2002 09:52:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787531#M833990</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-08-16T09:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787532#M833991</link>
      <description>Hi Justo&lt;BR /&gt;&lt;BR /&gt;Not with you on the cript bit.&lt;BR /&gt;&lt;BR /&gt;Do you meaan cript the a=&lt;BIT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Paula&lt;/BIT&gt;</description>
      <pubDate>Fri, 16 Aug 2002 09:56:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787532#M833991</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-08-16T09:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787533#M833992</link>
      <description>Paula,&lt;BR /&gt;&lt;BR /&gt;I know you weren't upset - I was just "not looking a gift horse in the mouth".&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 16 Aug 2002 10:00:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787533#M833992</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-08-16T10:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787534#M833993</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;What a wonderful expression:-&lt;BR /&gt;&lt;BR /&gt;"not looking a gift horse in the mouth"&lt;BR /&gt;&lt;BR /&gt;Derives from the days before automotive transport, and the way you can tell the age/ condition of a horse was by looking in its mouth - so if anyone gave you a horse as a gift it was very inpolite to look in its mouth.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;TGIF&lt;BR /&gt;&lt;BR /&gt;Paula&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Aug 2002 10:04:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787534#M833993</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-08-16T10:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787535#M833994</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Enhancement to pull password from root entry using above suggestions.&lt;BR /&gt;&lt;BR /&gt;b= `grep '^root:.*:0:' /etc/passwd | cut -d":" -f2`&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks guys&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Aug 2002 10:15:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787535#M833994</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2002-08-16T10:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787536#M833995</link>
      <description>Hi Paula,&lt;BR /&gt;&lt;BR /&gt;No, I just thinking to use the Chris recomendations about to put the old password in a file, then use the rights and the crypt in order to put in a safe place.&lt;BR /&gt;&lt;BR /&gt;In Spanish:&lt;BR /&gt;&lt;BR /&gt;"not looking a gift horse in the mouth" &lt;BR /&gt;"A caballo regalado no le mires el diente"&lt;BR /&gt;&lt;BR /&gt;;^D&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Fri, 16 Aug 2002 10:33:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787536#M833995</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-08-16T10:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: Free script Again</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787537#M833996</link>
      <description>Specifically you would check the number/condition of the horse's teeth, I believe.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 16 Aug 2002 10:48:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/free-script-again/m-p/2787537#M833996</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-08-16T10:48:28Z</dc:date>
    </item>
  </channel>
</rss>

