<?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: Help on Change ROOT password on several servers using script. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169586#M457724</link>
    <description>&lt;!--!*#--&gt;I figured out how to use pwck(1m):&lt;BR /&gt;for X in $(&amp;lt; server.list); do&lt;BR /&gt;   ssh ${X} -n "cp -p /etc/passwd /etc.passwd.${X}.ORIG"&lt;BR /&gt;   sleep 4  # not sure why you have it?&lt;BR /&gt;   ssh ${X} -n "sed -e 's/^root:.*:0:/root:hcROzuCGGBmPI,N.uT:0:/' /etc/passwd &amp;gt; /tmp/passwd.${X}.new"&lt;BR /&gt;   sleep 4&lt;BR /&gt;   ssh ${X} -n "pwck /tmp/passwd.${X}.new &amp;gt; /tmp/passwd.${X}.pwck 2&amp;gt;&amp;amp;1; if [ -s /tmp/passwd.${X}.pwck ]; then echo pwck errors; cat /tmp/passwd.${X}.pwck; else mv /tmp/passwd.${X}.new /etc/passwd; fi"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Note it would be much easier to have ssh invoke a script on the target machine to have all of those commands done locally.</description>
    <pubDate>Sat, 18 Apr 2009 07:14:46 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2009-04-18T07:14:46Z</dc:date>
    <item>
      <title>Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169571#M457709</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I need to change ROOT and user password on several servers.  Does anyone have any good scripts to do this task?&lt;BR /&gt;&lt;BR /&gt;I have some "sed" commands but did not help me much.&lt;BR /&gt;&lt;BR /&gt;Appreciate your help in advance.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;MJ&lt;BR /&gt;</description>
      <pubDate>Tue, 14 Apr 2009 15:53:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169571#M457709</guid>
      <dc:creator>Mike_305</dc:creator>
      <dc:date>2009-04-14T15:53:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169572#M457710</link>
      <description>see the links here re: sam's useradd &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1297956" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1297956&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;otherwise you'll need "expect", Perl's "expect" module, or something similar, as you can't redirect keyboard input to the std. passwd command</description>
      <pubDate>Tue, 14 Apr 2009 16:37:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169572#M457710</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-04-14T16:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169573#M457711</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I need to do this on several servers and I have this sed string.&lt;BR /&gt;&lt;BR /&gt;sed -e 's/^root:.*:0:/root:XyrAgtyI,N.uT:0:/' /etc/passwd&lt;BR /&gt;&lt;BR /&gt;I need help on scripting this one using the server list I have.  What I am trying to do is put this in FOR loop and change ROOT or any user password on all the servers.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;Thanks - MJ</description>
      <pubDate>Tue, 14 Apr 2009 17:02:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169573#M457711</guid>
      <dc:creator>Mike_305</dc:creator>
      <dc:date>2009-04-14T17:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169574#M457712</link>
      <description>well...the sed string shown should indeed change the password for root.  unclear as to the meaning of "any user password".  All users, any users that aren't locked, or???&lt;BR /&gt;&lt;BR /&gt;how do you intend to access the other servers? remsh, rexec, ssh batch or ???? (ssh batch is preferred) what do you have available to you.&lt;BR /&gt;&lt;BR /&gt;btw: take a look at this thread, as it's in a similar vein:&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1331882" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1331882&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 14 Apr 2009 18:13:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169574#M457712</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-04-14T18:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169575#M457713</link>
      <description>Hi MJ,&lt;BR /&gt;&lt;BR /&gt;the * in root's password field can mean that user root is locked, but it can also mean you are working on a trusted system with a shadow password file. You must not write directly to /etc/passwd in that case.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Bart</description>
      <pubDate>Wed, 15 Apr 2009 07:02:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169575#M457713</guid>
      <dc:creator>Bart Paulusse</dc:creator>
      <dc:date>2009-04-15T07:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169576#M457714</link>
      <description>Hi MJ,&lt;BR /&gt;&lt;BR /&gt;if you want to have same password on all the machine.&lt;BR /&gt;Download and install expect script on any one of the Servers.&lt;BR /&gt;Let me know if you want any help.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Tcl/expect-5.43/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Tcl/expect-5.43/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers!!</description>
      <pubDate>Wed, 15 Apr 2009 11:19:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169576#M457714</guid>
      <dc:creator>Pnaidu</dc:creator>
      <dc:date>2009-04-15T11:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169577#M457715</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Thanks for the feedback.  The password file is different on all the servers and we will access these servers from one location using ssh.&lt;BR /&gt;&lt;BR /&gt;Basically, I have a "for loop" but my problem is not able to put this script format.&lt;BR /&gt;&lt;BR /&gt;Appreciate your help.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Apr 2009 14:39:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169577#M457715</guid>
      <dc:creator>Mike_305</dc:creator>
      <dc:date>2009-04-16T14:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169578#M457716</link>
      <description>Hello Pnaidu,&lt;BR /&gt;&lt;BR /&gt;Do I install "expect" pkg on one server that I am pushing things and sshing from OR this pkg has to be install on all the servers?&lt;BR /&gt;&lt;BR /&gt;Appreciate your help.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 16 Apr 2009 14:45:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169578#M457716</guid>
      <dc:creator>Mike_305</dc:creator>
      <dc:date>2009-04-16T14:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169579#M457717</link>
      <description>MJ,&lt;BR /&gt;&lt;BR /&gt;Is this a one time task ? though I dont have any ready made scripts I am sure you should be a able to figure out a way if you spend enough i am saying this as scripting approch differece from person to person and we need to know what exactly you are trying to do.&lt;BR /&gt;&lt;BR /&gt;If this is gonna be something which u will be doing regualrly I would advice you to use tools like "gpg"&lt;BR /&gt;&lt;BR /&gt;-uvk</description>
      <pubDate>Thu, 16 Apr 2009 16:16:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169579#M457717</guid>
      <dc:creator>UVK_1</dc:creator>
      <dc:date>2009-04-16T16:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169580#M457718</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;What is "GPG" is that a paid product?  Anyway this what I am trying to do.&lt;BR /&gt;&lt;BR /&gt;This is something we have to do every 90 days, part of the security.  What I am trying to do is as below.  I have the command, I want to copy the password file before the change and then make my change.  That way I don't screw things up.&lt;BR /&gt;&lt;BR /&gt;I was thinking using "FOR LOOP" process, something like this and I need suggestion from ITRC GURU's to make this process better.  Not sure if this is going to work for me or not but I am trying.&lt;BR /&gt;&lt;BR /&gt;================================ &lt;BR /&gt;for X in $(cat server.list)&lt;BR /&gt;do&lt;BR /&gt;ssh ${X} "cp -p /etc/passwd /etc.passwd.${X}.ORIG"&lt;BR /&gt;sleep 4&lt;BR /&gt;ssh ${X} "sed -e 's/^root:.*:0:/root:hcROzuCGGBmPI,N.uT:0:/' /etc/passwd &amp;gt; /tmp/passwd.${X}.new"&lt;BR /&gt;sleep 4&lt;BR /&gt;done&lt;BR /&gt;====================&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; Verify the password file and then copy back on to each node.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance and appreciate everyone's help.</description>
      <pubDate>Thu, 16 Apr 2009 17:18:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169580#M457718</guid>
      <dc:creator>Mike_305</dc:creator>
      <dc:date>2009-04-16T17:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169581#M457719</link>
      <description>&lt;!--!*#--&gt;&lt;I was="" thinking="" using=""&gt;&lt;BR /&gt;Not that many changes:&lt;BR /&gt;for X in $(&amp;lt; server.list); do&lt;BR /&gt;   ssh ${X} -n "cp -p /etc/passwd /etc.passwd.${X}.ORIG"&lt;BR /&gt;   sleep 4  # not sure why you have it?&lt;BR /&gt;   ssh ${X} -n "sed -e 's/^root:.*:0:/root:hcROzuCGGBmPI,N.uT:0:/' /etc/passwd &amp;gt; /tmp/passwd.${X}.new"&lt;BR /&gt;   sleep 4&lt;BR /&gt;   # pwck(1M) here?&lt;BR /&gt;   # Then mv of /tmp/passwd.${X}.new to /etc/passwd &lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; Verify the password file and then copy back on to each node.&lt;BR /&gt;&lt;BR /&gt;Not really sure how to do this.  vipw(1m) would do some checks.  pwck(1M) may be useful.&lt;/I&gt;</description>
      <pubDate>Fri, 17 Apr 2009 05:07:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169581#M457719</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-04-17T05:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169582#M457720</link>
      <description>Hi MJ,&lt;BR /&gt;&lt;BR /&gt;you say want to do this every 90 days as part of security. You may want to rethink this then. You are not using a shadow password file, why not? &lt;BR /&gt;User root can log on using ssh and is not restricted to console login only,and you're not using sudo, why not?&lt;BR /&gt;These measures will improve your security a lot more then changing the root password 'quick and dirty' directly in the passwd file.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Bart</description>
      <pubDate>Fri, 17 Apr 2009 06:35:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169582#M457720</guid>
      <dc:creator>Bart Paulusse</dc:creator>
      <dc:date>2009-04-17T06:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169583#M457721</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;None of the server you can login as ROOT, its disable, we have to login using our ID and then sudo into the system.&lt;BR /&gt;&lt;BR /&gt;If I can get some help or good idea on what is the best way to improve my 4 lines of script and change the password using ssh function that will be a big help.&lt;BR /&gt;&lt;BR /&gt;Appreciate everyone's help and replies.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Apr 2009 14:57:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169583#M457721</guid>
      <dc:creator>Mike_305</dc:creator>
      <dc:date>2009-04-17T14:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169584#M457722</link>
      <description>"None of the server you can login as ROOT, its disable, we have to login using our ID and then sudo into the system"&lt;BR /&gt;&lt;BR /&gt;once you're root, can you ssh into the other systems without a password? As "root"?&lt;BR /&gt;&lt;BR /&gt;If not then you need to sort out connectivity first, as you won't be able to edit /etc/passwd as a normal user</description>
      <pubDate>Fri, 17 Apr 2009 19:43:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169584#M457722</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-04-17T19:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169585#M457723</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I can always do ssh hostname "command" that works for me, no issue there.  I just want to put some intelligence to the script.&lt;BR /&gt;&lt;BR /&gt;No issue on connectivity.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Apr 2009 20:28:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169585#M457723</guid>
      <dc:creator>Mike_305</dc:creator>
      <dc:date>2009-04-17T20:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169586#M457724</link>
      <description>&lt;!--!*#--&gt;I figured out how to use pwck(1m):&lt;BR /&gt;for X in $(&amp;lt; server.list); do&lt;BR /&gt;   ssh ${X} -n "cp -p /etc/passwd /etc.passwd.${X}.ORIG"&lt;BR /&gt;   sleep 4  # not sure why you have it?&lt;BR /&gt;   ssh ${X} -n "sed -e 's/^root:.*:0:/root:hcROzuCGGBmPI,N.uT:0:/' /etc/passwd &amp;gt; /tmp/passwd.${X}.new"&lt;BR /&gt;   sleep 4&lt;BR /&gt;   ssh ${X} -n "pwck /tmp/passwd.${X}.new &amp;gt; /tmp/passwd.${X}.pwck 2&amp;gt;&amp;amp;1; if [ -s /tmp/passwd.${X}.pwck ]; then echo pwck errors; cat /tmp/passwd.${X}.pwck; else mv /tmp/passwd.${X}.new /etc/passwd; fi"&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Note it would be much easier to have ssh invoke a script on the target machine to have all of those commands done locally.</description>
      <pubDate>Sat, 18 Apr 2009 07:14:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169586#M457724</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-04-18T07:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help on Change ROOT password on several servers using script.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169587#M457725</link>
      <description>Thanks for everyone's help.&lt;BR /&gt;&lt;BR /&gt;MJ</description>
      <pubDate>Thu, 30 Apr 2009 19:27:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-change-root-password-on-several-servers-using-script/m-p/5169587#M457725</guid>
      <dc:creator>Mike_305</dc:creator>
      <dc:date>2009-04-30T19:27:34Z</dc:date>
    </item>
  </channel>
</rss>

