<?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: Multiple user password change in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082354#M902836</link>
    <description>Hmmm...just tried to check and make sure the attachment is ok, but for some reason I can't open it from above.  Maybe you can.&lt;BR /&gt;Just in case here's the script again:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;########################&lt;BR /&gt;#  This script is to mass change&lt;BR /&gt;#   passwords and set account&lt;BR /&gt;#   to force user to change p/w&lt;BR /&gt;#   at next login..&lt;BR /&gt;#  Written by Sven Liessem HP.com&lt;BR /&gt;#   and Rita Workman&lt;BR /&gt;#   May, 2002&lt;BR /&gt;#&lt;BR /&gt;#  YOU MUST FIRST GET THE &lt;BR /&gt;#  ENCRYPTED PASSWORD VALUE&lt;BR /&gt;#   FOR NEWPASS VALUE&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;#  I run this script and output&lt;BR /&gt;#   to another file &amp;amp; then&lt;BR /&gt;#   lay file over /etc/passwd&lt;BR /&gt;#  ex: ./scripts/passwd_mass_chg.sh &amp;gt; /etc/passwd.new&lt;BR /&gt;#########################   &lt;BR /&gt;newpass="d.Cm86XRE3oH6,3..."&lt;BR /&gt;cat /etc/passwd | while read line&lt;BR /&gt;do&lt;BR /&gt; echo $line | grep -q '^[A-Z][A-Z]*:[^:]*,3\.\.\.:'&lt;BR /&gt; if [ $? -eq 0 ]&lt;BR /&gt;  then&lt;BR /&gt;   usrname=`echo $line | cut -d: -f1`&lt;BR /&gt;   therest=`echo $line | cut -d: -f 3-`&lt;BR /&gt;   echo $usrname:$newpass:$therest&lt;BR /&gt;     else&lt;BR /&gt;       echo $line&lt;BR /&gt; fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgrds,&lt;BR /&gt;Rita&lt;BR /&gt;</description>
    <pubDate>Wed, 01 Oct 2003 06:54:36 GMT</pubDate>
    <dc:creator>Rita C Workman</dc:creator>
    <dc:date>2003-10-01T06:54:36Z</dc:date>
    <item>
      <title>Multiple user password change</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082345#M902827</link>
      <description>Hi all&lt;BR /&gt;I'd be the first to admit that I'm not a good scripter, in fact I try an get by with the least script writing possible (I grew up on mainframes, and UNIX scripting has just never clicked with me).&lt;BR /&gt;Anyway: I often need to change multiple user passwords at a time, sometimes up to 30. These are usually for classrooms, testing, sandbox groups, etc, so we usually set the password to a generic and let the user change it again later. &lt;BR /&gt;Do any of you have a nifty way of feeding PASSWD a password?&lt;BR /&gt;I would normally have to do a "for x in a b c d ....do..passwd $x...done" and then go the whole laborious hog of picking a password type (Trusted converted server), then a password and confirmation.&lt;BR /&gt;Any ideas?</description>
      <pubDate>Wed, 01 Oct 2003 03:17:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082345#M902827</guid>
      <dc:creator>Jakes Louw</dc:creator>
      <dc:date>2003-10-01T03:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple user password change</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082346#M902828</link>
      <description>hi,&lt;BR /&gt; &lt;BR /&gt;if you want to set a password for a group of people you will need to combine "passwd" with "expect".&lt;BR /&gt; &lt;BR /&gt;But as you mentioned classrooms, testing, sandbox, ... maybe you can just remove the passwords?&lt;BR /&gt; &lt;BR /&gt;passwd -d -f username : to delete password and force a new one at next logon.&lt;BR /&gt; &lt;BR /&gt;passwd -l username : to lock accounts when not needed.&lt;BR /&gt; &lt;BR /&gt;good luck,&lt;BR /&gt;Thierry.</description>
      <pubDate>Wed, 01 Oct 2003 04:09:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082346#M902828</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2003-10-01T04:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple user password change</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082347#M902829</link>
      <description>Hi Thierry&lt;BR /&gt;&lt;BR /&gt;I'll play with the the -d -l options, maybe that's what could work in most cases.&lt;BR /&gt;Explain the "expect" thing to me?</description>
      <pubDate>Wed, 01 Oct 2003 04:12:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082347#M902829</guid>
      <dc:creator>Jakes Louw</dc:creator>
      <dc:date>2003-10-01T04:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple user password change</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082348#M902830</link>
      <description>expect is a program that talks to other interactive programs.  You can script it to wait for "New password:" and "Re-enter new password:" and send the new password accordingly.&lt;BR /&gt; &lt;BR /&gt;If you browse around (ITRC, google) you will probably find some examples.&lt;BR /&gt; &lt;BR /&gt;best regards,&lt;BR /&gt;Thierry.</description>
      <pubDate>Wed, 01 Oct 2003 04:18:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082348#M902830</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2003-10-01T04:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple user password change</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082349#M902831</link>
      <description>Thanks. You get some more points for that ;-&amp;gt;</description>
      <pubDate>Wed, 01 Oct 2003 04:24:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082349#M902831</guid>
      <dc:creator>Jakes Louw</dc:creator>
      <dc:date>2003-10-01T04:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple user password change</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082350#M902832</link>
      <description>hi again,&lt;BR /&gt; &lt;BR /&gt;BTW if the users are named more or less equal, you can shorten the script a lot, and don't have to bother if users are added.&lt;BR /&gt; &lt;BR /&gt;instead of "for x in a b c d e ........"&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;for x in $(grep "Classroom Student" /etc/passwd |cud -d":" -f1)&lt;BR /&gt;do&lt;BR /&gt;...&lt;BR /&gt;done&lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;Thierry.</description>
      <pubDate>Wed, 01 Oct 2003 04:27:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082350#M902832</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2003-10-01T04:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple user password change</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082351#M902833</link>
      <description>Keep these users at the end of the passwd file. Keep a seperate text file with the default users settings like this:&lt;BR /&gt;name:passwdstring:gid:uid &lt;BR /&gt;name2:passwdstring:gid:uid &lt;BR /&gt;name3:passwdstring:gid:uid &lt;BR /&gt;&lt;BR /&gt;etc.&lt;BR /&gt;&lt;BR /&gt;As long as the passwd string is the same. then the passwd will be too. You can just paste this onto the end of /etc/passwd whenever you need 20 temporary users or so. If they are temp users then its ok to give them logins like login1, login2 etc. And there's no real reason why they can't be re-used.</description>
      <pubDate>Wed, 01 Oct 2003 06:23:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082351#M902833</guid>
      <dc:creator>Myles McManus</dc:creator>
      <dc:date>2003-10-01T06:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple user password change</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082352#M902834</link>
      <description>Hi Myles &lt;BR /&gt;That doesn't work very well once the server is trusted.</description>
      <pubDate>Wed, 01 Oct 2003 06:29:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082352#M902834</guid>
      <dc:creator>Jakes Louw</dc:creator>
      <dc:date>2003-10-01T06:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple user password change</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082353#M902835</link>
      <description>I needed to something similar awhile back and with the help of a great guy from HP, we got this script worked out.&lt;BR /&gt;In my case key was that all the users had login names as 'all caps', but you could change it to whatever will work for you...&lt;BR /&gt;&lt;BR /&gt;Hope it helps,&lt;BR /&gt;Rgrds,&lt;BR /&gt;Rita&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Oct 2003 06:46:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082353#M902835</guid>
      <dc:creator>Rita C Workman</dc:creator>
      <dc:date>2003-10-01T06:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple user password change</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082354#M902836</link>
      <description>Hmmm...just tried to check and make sure the attachment is ok, but for some reason I can't open it from above.  Maybe you can.&lt;BR /&gt;Just in case here's the script again:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;########################&lt;BR /&gt;#  This script is to mass change&lt;BR /&gt;#   passwords and set account&lt;BR /&gt;#   to force user to change p/w&lt;BR /&gt;#   at next login..&lt;BR /&gt;#  Written by Sven Liessem HP.com&lt;BR /&gt;#   and Rita Workman&lt;BR /&gt;#   May, 2002&lt;BR /&gt;#&lt;BR /&gt;#  YOU MUST FIRST GET THE &lt;BR /&gt;#  ENCRYPTED PASSWORD VALUE&lt;BR /&gt;#   FOR NEWPASS VALUE&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;#  I run this script and output&lt;BR /&gt;#   to another file &amp;amp; then&lt;BR /&gt;#   lay file over /etc/passwd&lt;BR /&gt;#  ex: ./scripts/passwd_mass_chg.sh &amp;gt; /etc/passwd.new&lt;BR /&gt;#########################   &lt;BR /&gt;newpass="d.Cm86XRE3oH6,3..."&lt;BR /&gt;cat /etc/passwd | while read line&lt;BR /&gt;do&lt;BR /&gt; echo $line | grep -q '^[A-Z][A-Z]*:[^:]*,3\.\.\.:'&lt;BR /&gt; if [ $? -eq 0 ]&lt;BR /&gt;  then&lt;BR /&gt;   usrname=`echo $line | cut -d: -f1`&lt;BR /&gt;   therest=`echo $line | cut -d: -f 3-`&lt;BR /&gt;   echo $usrname:$newpass:$therest&lt;BR /&gt;     else&lt;BR /&gt;       echo $line&lt;BR /&gt; fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgrds,&lt;BR /&gt;Rita&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Oct 2003 06:54:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082354#M902836</guid>
      <dc:creator>Rita C Workman</dc:creator>
      <dc:date>2003-10-01T06:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple user password change</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082355#M902837</link>
      <description>I use perl module Authen-PAM. Creating a thousand users and change the passwords is just a matter of a few minutes. The following url is an introduction to it,&lt;BR /&gt;&lt;A href="http://www.cs.kuleuven.ac.be/~pelov/pam/Authen/PAM/FAQ.html" target="_blank"&gt;http://www.cs.kuleuven.ac.be/~pelov/pam/Authen/PAM/FAQ.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Jun</description>
      <pubDate>Thu, 02 Oct 2003 11:10:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082355#M902837</guid>
      <dc:creator>Jun Zhang_4</dc:creator>
      <dc:date>2003-10-02T11:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple user password change</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082356#M902838</link>
      <description>Just a final point on this:&lt;BR /&gt;&lt;BR /&gt;after looking at expect, and struggling with finding the right version of TCL/TK, we finally just opted for forcing a disable/re-entry of the specified users' password using "passwd -f".&lt;BR /&gt;&lt;BR /&gt;Thanks to whomever suggested this as an alternative.</description>
      <pubDate>Wed, 14 Jan 2004 07:19:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/multiple-user-password-change/m-p/3082356#M902838</guid>
      <dc:creator>Jakes Louw</dc:creator>
      <dc:date>2004-01-14T07:19:47Z</dc:date>
    </item>
  </channel>
</rss>

