<?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: Can I write script to change users passwds in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805463#M82919</link>
    <description>Sushil,&lt;BR /&gt;&lt;BR /&gt;Simple procedures :&lt;BR /&gt;&lt;BR /&gt;1) Do you have NIS. If yes, then you may have just once master copy of the passwords and remove the password entries for each user from the local system and change in /etc/nsswitch.conf&lt;BR /&gt;&lt;BR /&gt;passwd   nis [NOT Found] files&lt;BR /&gt;&lt;BR /&gt;2) If you don't have NIS. Create a master copy of /etc/passwd on one system. Update the passwords on one system. Copy the /etc/passwd file on all other systems via a script. You may use ftp in your script to update other systems.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Anil</description>
    <pubDate>Mon, 16 Sep 2002 16:19:14 GMT</pubDate>
    <dc:creator>Anil C. Sedha</dc:creator>
    <dc:date>2002-09-16T16:19:14Z</dc:date>
    <item>
      <title>Can I write script to change users passwds</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805457#M82913</link>
      <description>Hi all,&lt;BR /&gt;        I was wondering if some one or if there is some way I can automate changing fo passwords.  I have 34 HP machine and changing password on each of this for atleast 6 user is going to be a pain.  Is there any way I can automate or write script for the above purpose</description>
      <pubDate>Thu, 12 Sep 2002 21:00:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805457#M82913</guid>
      <dc:creator>Sushil Singh_1</dc:creator>
      <dc:date>2002-09-12T21:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can I write script to change users passwds</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805458#M82914</link>
      <description>would you be able / allowed to implement NIS?  If security does not prevent it, you may want to consider it.... especially if a lot of the machines have the same user accounts...&lt;BR /&gt;&lt;BR /&gt;I do not have a script, but am a pretty firm believer that almost everything in Unix can be scripted... no doubt some smart person out there will give you a gem</description>
      <pubDate>Thu, 12 Sep 2002 21:10:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805458#M82914</guid>
      <dc:creator>Ted Ellis_2</dc:creator>
      <dc:date>2002-09-12T21:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can I write script to change users passwds</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805459#M82915</link>
      <description>sushil&lt;BR /&gt;&lt;BR /&gt;Have a look at&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.netsys.com/sunmgr/1997-08/msg00082.html" target="_blank"&gt;http://www.netsys.com/sunmgr/1997-08/msg00082.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;HTH &lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 12 Sep 2002 23:50:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805459#M82915</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-09-12T23:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can I write script to change users passwds</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805460#M82916</link>
      <description>Here's an old fashioned way of keeping passwords synchronized (pre-NIS):&lt;BR /&gt;&lt;BR /&gt;1) Tell users to only change their passwords on one host (or their changes won't work.)&lt;BR /&gt;&lt;BR /&gt;2) Build a SIMPLE script to copy /etc/passwd (and /etc/shadow) to all of the hosts.&lt;BR /&gt;&lt;BR /&gt;3) Build a SIMPLE script to check if the passwd file (and shadow file if necessary) has changed since the last time this script was run.&lt;BR /&gt;&lt;BR /&gt;Pseudo code follows:&lt;BR /&gt;if (testfile exists)&lt;BR /&gt;  diff testfile /etc/passwd&lt;BR /&gt;  if not identical&lt;BR /&gt;    run script from line 2&lt;BR /&gt;    cp /etc/passwd testfile&lt;BR /&gt;else&lt;BR /&gt;    cp /etc/passwd testfile&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;4) Take script of line 3 and make it a cron job to run every 1 minute.  &lt;BR /&gt;&lt;BR /&gt;[ Comment: Yes, a diff running once per minute may be taxing, but geez, telling people to wait two minutes for their changes to take effect will be annoying too. I've tried the "run this script" to change your passwd, and people forget to, or know too much about UNIX and outright ignore you. ]&lt;BR /&gt;&lt;BR /&gt;5) For the ultra accurate, kick off script of line 3 on every boot up of the "passwd host" in line 1.&lt;BR /&gt;&lt;BR /&gt;You could edit all six accounts from one host, and in one minute after you're done - all hosts are being updated for you.  Obviously, there is room for improvement, like verifying the files arrived to each host, and so on.&lt;BR /&gt;&lt;BR /&gt;When you get past 40 hosts, keeping tabs on these files gets downright annoying.  Consider moving to NIS or LDAP services.&lt;BR /&gt;</description>
      <pubDate>Fri, 13 Sep 2002 13:19:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805460#M82916</guid>
      <dc:creator>Brian Kinney</dc:creator>
      <dc:date>2002-09-13T13:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can I write script to change users passwds</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805461#M82917</link>
      <description>If you have a trusted system passwords are located in the files&lt;BR /&gt;&lt;BR /&gt;/tcb/files/auth/&lt;LETTER&gt;/&lt;USERNAME&gt;&lt;BR /&gt;&lt;BR /&gt;e.g root-password in &lt;BR /&gt;&lt;BR /&gt;/tcb/files/auth/r/root&lt;BR /&gt;&lt;BR /&gt;So you have to copy the password-entry &lt;BR /&gt;u_pwd=&lt;CRYPTED password=""&gt; &lt;BR /&gt;to the other machines.&lt;BR /&gt;&lt;BR /&gt;I recommend not to copy the whole file to the other machines cause you will loose information such as count of unsuccessful logins, ...&lt;BR /&gt;&lt;BR /&gt;Christian&lt;/CRYPTED&gt;&lt;/USERNAME&gt;&lt;/LETTER&gt;</description>
      <pubDate>Mon, 16 Sep 2002 06:09:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805461#M82917</guid>
      <dc:creator>Christian Gebhardt</dc:creator>
      <dc:date>2002-09-16T06:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can I write script to change users passwds</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805462#M82918</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;you could use the SAM-tool from "/usr/sam/lbin/", but in case you'll get a non-HPUX-system that would not work, so I would recommend to get "expect" and use that to run interactive commands like "passwd" in a batch-oriented way under your (expect-)script's control.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Wodisch&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Sep 2002 16:05:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805462#M82918</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2002-09-16T16:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can I write script to change users passwds</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805463#M82919</link>
      <description>Sushil,&lt;BR /&gt;&lt;BR /&gt;Simple procedures :&lt;BR /&gt;&lt;BR /&gt;1) Do you have NIS. If yes, then you may have just once master copy of the passwords and remove the password entries for each user from the local system and change in /etc/nsswitch.conf&lt;BR /&gt;&lt;BR /&gt;passwd   nis [NOT Found] files&lt;BR /&gt;&lt;BR /&gt;2) If you don't have NIS. Create a master copy of /etc/passwd on one system. Update the passwords on one system. Copy the /etc/passwd file on all other systems via a script. You may use ftp in your script to update other systems.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Anil</description>
      <pubDate>Mon, 16 Sep 2002 16:19:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805463#M82919</guid>
      <dc:creator>Anil C. Sedha</dc:creator>
      <dc:date>2002-09-16T16:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can I write script to change users passwds</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805464#M82920</link>
      <description>Sushil,&lt;BR /&gt;&lt;BR /&gt;Don't forget to assign points if the answers suit you. just reminding.&lt;BR /&gt;&lt;BR /&gt;:-)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Anil</description>
      <pubDate>Mon, 16 Sep 2002 16:25:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805464#M82920</guid>
      <dc:creator>Anil C. Sedha</dc:creator>
      <dc:date>2002-09-16T16:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can I write script to change users passwds</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805465#M82921</link>
      <description>Hi All,&lt;BR /&gt;        Thank you all for taking interest and providing wonderful solutions.&lt;BR /&gt;&lt;BR /&gt;Ted,&lt;BR /&gt;     NIS was a good idea.  But only issue was that all the machine name would have same passwords, which could have been a potential problem.&lt;BR /&gt;&lt;BR /&gt;Steven,&lt;BR /&gt;      The site u sent was right on the money, I was able get all the information and finally have a cron script doing all the work for me.&lt;BR /&gt;&lt;BR /&gt;Brian,&lt;BR /&gt;      It was a good idea to work the scripts that way, but I would need to change the password on weekly bases and cannot have the same password for atleast 13 weeks.&lt;BR /&gt;&lt;BR /&gt;Christian,&lt;BR /&gt;         Sorry, don't have trusted system yet.  We are moving toward that soon.&lt;BR /&gt;&lt;BR /&gt;Wodisch,&lt;BR /&gt;         I did use expect and it worked like a charm.&lt;BR /&gt;&lt;BR /&gt;Anil,&lt;BR /&gt;       We have total of 48 machine including IMB, HP and SUN.  Making /etc/passwd file for each of these machine with unique password would be more work than actually changing the password.  But ur solution would have worked on lesser number of systems&lt;BR /&gt;&lt;BR /&gt;  Thank u all again</description>
      <pubDate>Mon, 16 Sep 2002 21:08:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-i-write-script-to-change-users-passwds/m-p/2805465#M82921</guid>
      <dc:creator>Sushil Singh_1</dc:creator>
      <dc:date>2002-09-16T21:08:59Z</dc:date>
    </item>
  </channel>
</rss>

