Had a lot of good responses to this one. The answer seems to be a free utility called 'expect'. The prize goes to Stuart Hartley for being the first respondant to land in my inbox. Greg Freemyer has done something similar with a 'c' program. I'll go with expect as I reckon there are a whole bunch of reasons that I can find to use it.
Thanks to all,
Bryan Mills.
-----Original Message-----
From: bryan.mills_at_lynx.co.uk [SMTP:MIME :bryan.mills_at_lynx.co.uk]
Sent: Thursday, May 24, 2001 3:24 PM
To: tru64-unix-managers_at_ornl.gov
Subject: useradd command.
-------------------------------------------------------------------------- --
I need to be able to set up 800 users on a newly installed TRU64
server. I have created a shell script which cat's a file containing the
login and then loops for each issuing a useradd command, specifying login
shell, home directory etc. What I can not achieve is to assign a default
password to each login using the passwd command. Does anyone know how to
do this within a script?
Thanks,
Bryan.
This message is intended only for the use of the person(s) ("The intended
Recipient(s)") to whom it is addressed. It may contain information which
is privileged and confidential within the meaning of applicable law. If
you are not the intended recipient, please contact the sender as soon as
possible. The views expressed in this communication are not necessarily
those held by LYNX Express Limited.
This message is intended only for the use of the person(s) ("The intended
Recipient(s)") to whom it is addressed. It may contain information which
is privileged and confidential within the meaning of applicable law. If
you are not the intended recipient, please contact the sender as soon as
possible. The views expressed in this communication are not necessarily
those held by LYNX Express Limited.
Received on Thu May 24 2001 - 15:16:17 NZST