[Tutor] Copying file to multiple machines.

Ignacio Vazquez-Abrams ignacio@openservices.net
Tue, 18 Sep 2001 17:52:20 -0400 (EDT)


On Tue, 18 Sep 2001, Empire Down  wrote:

> I am new to python and am trying to copy a file from my machine to multiple machines on a network (98 machines) I know this can be done simply with a shell script but I have been wanting to learn Python and figured this would be somehting simple I could do, though it is turning out not to be so simple. I have Mark Hammond book.. but i think still need a little assistance.

You don't mention how you would do it with shell scripts, so I have no
background information to go on. With that in mind, here comes my zany
solution....

TCP/IP broadcasting/multicasting. On each of the client machines run a small
script that attaches to a socket and waits for an incoming connection. On your
server machine, you run a script that broadcasts/multicasts the filename
followed by the filecontents. The client then looks at the filename and dumps
the filecontents into the file.

The client will have to make sure that the connection is authenticated, and
that the filename isn't something important, like '/etc/passwd'.

-- 
Ignacio Vazquez-Abrams  <ignacio@openservices.net>