Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help automating setting a password

Status
Not open for further replies.

dmaddox

MIS
Dec 30, 2002
1
US
I have a ksh script I am writing, to automate the creation of a user, with a password, on a number of systems.

How might I accomplish this?

I believe the following:

passwd userid
echo password
echo password
pwdadm -c userid

Any suggestions?
 
you will get good results using expect scripting instead of ksh. i am sure that you can do it via ksh somehow but it probably requires a lot of character-piping, if it even works at all.

IBM Certified -- AIX 4.3 Obfuscation
 
I would recommend that you use expect as well. If for some reason that is not possible, you could use sed/awk to replace the encripted password in /etc/security/passwd

Jay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top