SUMMARY: FW: Bulk passwd change using a "here" script

From: SMITH, Carl, IT-NWS <Carl.Smith_at_natwest.com>
Date: Fri Sep 20 2002 - 06:12:37 EDT
Gurus,

Many thanks to everyone who has responded so quick, especially to:  -

Justin Stringfellow
Ed Rolison
Rob Rugman
Hendrik Visage
Matt Garrett

The reason why the script doesn't work is that passwd reads from tty not
stdin.  The solutions provided are as follows:  -

1) Use Expect which you can download from http://www.sunfreeware.com  or
http://expect.nist.gov/ which by all accounts needs the TCL and TK packages
installed as well.  A doc on the following website
http://www.faqs.org/faqs/unix-faq/faq/part3/section-9.html for Expect.

2) Manually change the passwd for one of the users, grab the encrypted
password string and manually plonk it in to the shadow file for each user.


Thanks Again All,

Carl Smith
UNIX System Administrator
UNIX Support (NWS)
Coutts Group IT
carl.smith@natwest.com


Issued by NatWest Stockbrokers Limited, a member of the London Stock
Exchange and regulated by the FSA.
Registered Office : 55 Mansell Street, London E1 8AN. Registered number
1959479 England



> -----Original Message-----
> From:	SMITH, Carl, IT-NWS 
> Sent:	20 September 2002 10:04
> To:	'sunmanagers'
> Subject:	Bulk passwd change using a "here" script
> 
> All,
> 
> I am regularly going to have to reset 150 user's passwords and set them to
> a chosen default password, then forces them to change it.  I have set up a
> here script to do this, but the script does not enter the password into
> the password prompt and instead waits for you to type in a password, I
> have tried numerous different methods but without success.  The script is
> very basic, I can't believe there is an issue with it:  -
> 
> #!/bin/ksh
> #
> ## Variables
> USERLIST=/var/tmp/userlist.txt
> 
> ## Main
> for USER in `cat $USERLIST`
> do
> passwd $USER << EOF
> defaultpw
> defaultpw
> passwd -f $USER
> EOF
> done
> 
> TIA,
> 
> Carl
> 
> Carl Smith
> UNIX System Administrator
> UNIX Support (NWS)
> Coutts Group IT
> carl.smith@natwest.com
> 
> 
> Issued by NatWest Stockbrokers Limited, a member of the London Stock
> Exchange and regulated by the FSA.
> Registered Office : 55 Mansell Street, London E1 8AN. Registered number
> 1959479 England
> 
> 
> 
National Westminster Bank Plc ("the Bank") is a member of the NatWest and
Gartmore Marketing Group. The only packaged products (life policies, unit
trusts and other collective investment schemes and stakeholder and other
pensions) the Bank advises on and sells are those of the Marketing Group,
whose members are regulated by the Financial Services Authority.  NatWest
Stockbrokers Limited is also a Member of the London Stock Exchange.

National Westminster Bank Plc.  Registered in England No 929027.  Registered
Office: 135 Bishopsgate, London EC2M 3UR.  National Westminster Bank Plc is
a member of The Royal Bank of Scotland Group.

Agency agreements exist between members of The Royal Bank of Scotland Group.

This e-mail message is confidential and for use by the addressee only. If
the message is received by anyone other than the addressee, please return
the message to the sender by replying to it and then delete the message from
your computer. Internet e-mails are not necessarily secure. National
Westminster Bank Plc does not accept responsibility for changes made to this
message after it was sent. 

Whilst all reasonable care has been taken to avoid the transmission of
viruses, it is the responsibility of the recipient to ensure that the onward
transmission, opening or use of this message and any attachments will not
adversely affect its systems or data. No responsibility is accepted by The
Royal Bank of Scotland plc in this regard and the recipient should carry out
such virus and other checks as it considers appropriate.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Sep 25 21:04:53 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:55 EST