AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  Changing a users password across a 100 servers

    Posted Wed March 05, 2008 03:29 PM

    Originally posted by: SystemAdmin


    Say I have 100 different servers. All have different functions and different users accessing them. There is however a common user that is the same on each server.

    Is there a way to write a script that goes out and changes the password for that user on all the servers if standard input is the list of servers?

    Thanks in advance,

    Z


  • 2.  Re: Changing a users password across a 100 servers

    Posted Wed March 05, 2008 03:50 PM

    Originally posted by: SystemAdmin


    I've done something like this but it required Expect to be installed on each server.

    You could script the install of Expect, then script the password change.


  • 3.  Re: Changing a users password across a 100 servers

    Posted Wed March 05, 2008 06:04 PM

    Originally posted by: aixylinux


    Install Expect and its prereq Tcl. They are in the AIX Linux toolbox. After the install you will find a script /usr/bin/passmass. This script will change a password on all hosts listed on the command line. 100 systems might fit on the command line, but you'd be better off to change the script to read the systems from a file. Also the script assumes the hosts are all accessed the same way -- telnet, rlogin, etc. It needs a minor update to support SSH. I know it easy to say "change the script". But Expect/Tcl is not that hard to learn, and it's a very useful tool. Refer to the O'Reilly book "Exploring Expect" by Don Libes.

    passmass -telnet host1 host2 host3


  • 4.  Re: Changing a users password across a 100 servers

    Posted Thu March 06, 2008 10:10 AM

    Originally posted by: SystemAdmin


    Thanks guys.

    I think thats the path Ill take.

    Zipp
    San Antonio,Texas