Re: Question about "SCP" command
From:Date: 05/21/02
- Next message: Armin Krawinkel: "Re: root password help"
- Previous message: ntfx: "Re: inetd.conf"
- In reply to: fish: "Question about "SCP" command"
- Next in thread: Daniel Harrison: "Re: Question about "SCP" command"
- Reply: Daniel Harrison: "Re: Question about "SCP" command"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 21 May 2002 00:49:24 GMT
"fish" <yuzuohong@online.sh.cn> wrote in message
news:aad6fd91.0205200350.514e097@posting.google.com...
> Hi all,
>
> We have more than 100 RedHat 7.2 servers running. They are all same
> IBM servers. Now it's time to change the ROOT password for them. Of
> course I don't wanna SSH to them individually to run "PASSWD".
> I thought of a simple shell program. But I still have some problem on
> it. Please help me out.
> I wanna do like this--At first, I change the ROOT password for one of
> them. Then I "SCP" /etc/shadow to all the other machines so that they
> could have the same new password.
> But I don't know how to use SCP at this situation. I read the manual
> and did some test, but all failed. You know, this "SCP" command
> should run batchly without any stop or question.
> Is it possible? Please help me with this SCP command. Thank you so
> much.
>
> fish
If you need to propagate this and you haven't already put SSH keys in place
or are running NIS or LDAP, you're screwed.
If you're running NIS, you can create an alternative root user with UID 0
that can run scp or rsync to hit every remote machine.
If you already have the keys, just load up your private key into ssh-agent
and run
for name in [ list of hostnames ]; do
scp /etc/shadow root@$name:/etc/shadow
done
Of course, this will break things on any server that doesn't have the same
userlist, such as if you've installed or removed web servers, apache, user
accounts, etc. on some of the machines.
Instead, consider running a littls "sed" utility to replace the root account
entry with a new encrypted password, and just edit that line with it.
- Next message: Armin Krawinkel: "Re: root password help"
- Previous message: ntfx: "Re: inetd.conf"
- In reply to: fish: "Question about "SCP" command"
- Next in thread: Daniel Harrison: "Re: Question about "SCP" command"
- Reply: Daniel Harrison: "Re: Question about "SCP" command"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|