Script to change root passwords

Script to change root passwords

Post by Mik » Wed, 26 Feb 2003 21:37:23



Hi there,

I have about 100 Unix servers sitting at different locations, what I
want to know is is it possible to write a script to log into all those
machines, and change there root passwords.

I think the main problem would be to be able to log into those
machines as root and then seconodly activate the script to do the
password change. Because the way I figure it is that a script can only
run locally. Am I wrong with this assumption ?

Has anyone done something like this before? is it possible ?

Thanks a ton

Mike

 
 
 

Script to change root passwords

Post by Cedric Blanche » Wed, 26 Feb 2003 21:44:05


Dans sa prose, Mike nous ecrivait :

Quote:> I have about 100 Unix servers sitting at different locations, what I
> want to know is is it possible to write a script to log into all those
> machines, and change there root passwords. I think the main problem
> would be to be able to log into those machines as root and then
> seconodly activate the script to do the password change. Because the way
> I figure it is that a script can only run locally. Am I wrong with this
> assumption ?

You can use Perl SSH (Net::SSH) extensions that will allow you to use SSH
into a Perl script, which mean you can automate SSH login and command you
want to execute remotly.

If you want to get rid of interactive stuff such as login password, use
key based authentication.

See :

        http://search.cpan.org/search?query=ssh&mode=all

My 0.02 ;)

--
/* Nobody will ever see this message :-) */
panic("Cannot initialize video hardware\n");
        2.0.38 /usr/src/linux/arch/m68k/atari/atafb.c