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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passwd command in a script 1

Status
Not open for further replies.

BlackTekMan

Technical User
Feb 2, 2006
4
FR
Hello,

I'm on UNIX system running AIX 5.2.
I need to change passwords of several users, and i'd like to do it in a script.
But I don'y know how to use the passwd command in an automated script. How to answer the questions asked by the command automatically ?

Thanks in advance.

BlackTechMan
 
See this FAQ in the "IBM: AIX" forum on this website.

faq52-5866

HTH,

p5wizard
 
Thank you p5wizard.
But I'm no programmer, my system does'nt have a compiler and I can't install one (company policy).
Is there a simpler way to do it via shell script ?
Thanks,
BlackTechMan
 
if you have expect, it can probably be done with scripting. I don't have an example. Perhaps someone else can pick up this thread.

HTH,

p5wizard
 
If you do a search on the IBM AIX forum for 'password' you'll find this thread which explains expect. I'm sure there's plenty more for you there as well

Columb Healy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top