SUMMARY: Setting initial passwords

From: Martin Rootes (M.Rootes@sheffield-city-poly.ac.uk)
Date: Fri Jul 24 1992 - 20:14:22 CDT


Dear All,

    Thanks for the numerous replies to my question, I have been attempting to
prepare a more detailed summary, but messages keep arriving. So I have decided
to send a brief summary now mainly to say WOAH STOP!. I'll prepare a more
detailed summary on Monday. Anyway the question was.

> Dear All,
>
> I'm currently writing a script to add users to our Sun 670 (SunOS 4.1.2)
> NIS master server. What I want to be able to do is to set the inital password
> at the same time to a randomly generated 6 letter password. I have writen a
> small C program to generate these passwords, but have now struck a problem,
> namely that I can not set the password by piping the output of this program
> into either passwd or ypasswd.
>
> How can I set initial passwords, at present I'm only adding single users
> so I can manually change the passwords, but in the near future I will be
> adding codes for students, which will involve adding 30-100 codes at a time.
>
> Martin
>
The following people have responded so far (the next postin will hopefully
contain a full list):

Brent Chivers bchivers@smiley.mitre.org
Brett Lymn blymn@awadi.com.AU
Chris Keane chris@rufus.state.COM.AU *
Colin Eagle C.Eagle@massey.ac.nz
Colin Macleod cmacleod@mcs.dundee.ac.uk
Daniel Baldoni flint@au.edu.curtin.cs
Dave Mitchell D.Mitchell@dcs.sheffield.ac.uk *
David Lee T.D.Lee@durham.ac.uk
Eckhard Rueggeberg Eckhard.Rueggeberg@ts.go.dlr.de
Ed Arnold era@niwot.scd.ucar.EDU
Geert Jan geertj@ica.philips.nl
James Ashton jaa101@gorton.anu.edu.au
Jim Davidson jimbo@crseo.ucsb.edu *
Joseph "C." Konczal konczal@sunmgr.ncsl.nist.gov
Kes Masalaitas kes@gvlf6.GVL.Unisys.COM
Marcel Bernards bernards@ECN.NL
Meg Grice mlg@cstp.umkc.edu
Michael Hwa hwa@nicco.sscnet.ucla.edu
Mike Raffety miker@sbcoc.com
Peter Shipley shipley@tfs.COM
Steve Simmons scs@lokkur.UUCP
Torsten Metzner tom@uni-paderborn.de *

The answers fell into 5 different methods:-

   1. Use a pacakge called expect, this can send commands to an interactive
      program and then react depending on the reply.

   2. Use perl to generate an encrypted password (perl has this function built
      in), then update passwd file directly.

   3. Use crypt to generate an encrypted version of the password and update the
      passwd file directly. This is the method I've chosen, adapting the random
      password generating program to also output the encrypted password.

   4. Use pty or rsh by piping the password twice to pty/rsh which then runs
      passwd

   5. Modify the source code to passwd.

If anyone can think of any OTHER method between now and Monday then feel free
to send it otherwise, if not then I have enough to go on already.

 Thanks

 Martin.

------------------------------------------------------------------------------
Martin Rootes - Senior Systems Programmer/Analyst - Sheffield City Polytechnic
Email : M.Rootes@scp.ac.uk
Disclaimer: Sheffield City Polytechnic has no opinions, the ones above are
                mine.
------------------------------------------------------------------------------



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:45 CDT