To expand James' answer a bit (I've never used the chpasswd command):
for I in system1 system2 system3 ; do
ssh [EMAIL PROTECTED] 'echo "user:newpass" | chpasswd'
done
The list of systems could be given by hand, as above, or could be pulled
from a file, as in "for I in `cat system.names` ; do" (not sure what the
various e-mail programs will do with that, but those are back-ticks around
the cat command.
You can speed this process up by trading a public key with all the servers
involved, such that you wouldn't need to enter a password for each server.
With that in mind, it would be a better idea to use another, properly
privledged userid, other than root, to perform the task. Maybe go with "ssh
[EMAIL PROTECTED] 'echo "user:newpass" | sudo chpasswd'", and pass around a
public
key for "pswdguy".
--
.~. Robert P. Nix Mayo Foundation
/V\ RO-OE-5-55 200 First Street SW
/( )\ 507-284-0844 Rochester, MN 55905
^^-^^ -----
"In theory, theory and practice are the same, but
in practice, theory and practice are different."
On 10/26/07 8:45 AM, "Richard Lynch" <[EMAIL PROTECTED]> wrote:
> CHAPLIN, JAMES (CTR) wrote:
>> Running zLinux as Guests on zVM is fantastic until it comes time to
>> reset your password across multiple servers. The guest servers are
>> multiply like rabbits. We are a shop new to Linux on the mainframe and
>> have a question.
>>
>> Is there a way to apply without using LDAP, or to issue a series of
>> commands like passwd across multiple servers either through SSH or other
>> method from a single server. Where should I point my "learning curve" to
>> resolve this? I am new to scripting, but how different from REXX can it
>> be?
>>
>> Thanks in advance for any comments and insight
>> James Chaplin
>> Systems Programmer
>> USCBP
>>
>> ----------------------------------------------------------------------
>> For LINUX-390 subscribe / signoff / archive access instructions,
>> send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
>> visit
>> http://www.marist.edu/htbin/wlvindex?LINUX-390
>>
>>
> LDAP is clearly the perferred solution for this situation. However, if
> you don't want to do that see chpasswd. Somthing like...
>
> echo 'user:newpass' | chpasswd
>
> ... could be pushed out to the other servers using ssh.
>
> ~rich
>
>
>
>
> --
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390