Visit Our UNIX and Linux User Community


How can I update a file on 50 systems at once?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How can I update a file on 50 systems at once?
# 8  
Old 12-21-2001
tried but failed again

Here is the slightly modified version of the script I am using and what it gives me.
Code:
#! /usr/bin/ksh

pmqutil=/mqadmin/patrol/util/

LIST="kccdeda13 kdacct01 kdniat01"

USER=darthur

print -n "unixforme1"
stty -echo
read PASSWORD
stty echo
print

exec 4>&1
ftp -nv >&4 2>&4 |&

for SYSTEM in $LIST ; do
       print -p open $SYSTEM
       print -p user $USER "$PASSWORD"
       print -p cd $pmqutil
       print -p ls -l 
       print -p close
done

print -p bye
wait
exit 0

$ ftptest
unixforme1
Connected to kccdeda13.dev.rinkydink.com.
220 kccdeda13 FTP server (Version 4.1 Tue May 15 16:38:46 CDT 2001) ready.
331 Password required for darthur.
Password:


It still prompts me. I am running the script from an AIX 4.3.3 system attempting to ftp to a Solaris, HP-UX, and AIX systems and they all do the same thing.

added code tags for readability --oombera

Last edited by oombera; 02-20-2004 at 02:35 AM..
# 9  
Old 12-21-2001
If this is a file that needs to be updated on a regular basis, you might want to check out the rdist command. It's designed to do exactly what you're trying to do and is a standard UNIX command.


man rdist
# 10  
Old 12-22-2001
Re: tried but failed again

Quote:
Originally posted by darthur
Here is the slightly modified version of the script I am using and what it gives me.


print -n "unixforme1"
stty -echo
read PASSWORD
stty echo
print

Darthur, I think you got this mixed up. If your password is "unixforme1" then we need to get that string into the variable called PASSWORD. One way to do that would be:
PASSWORD="unixforme1"

But another way would be to have the script ask for the password. That is the idea with:
print -n "Enter password -"
stty -echo
read PASSWORD
stty echo
print
When the script runs, it will type out "Enter password -". Then the user will type in "unixforme1". The "stty -echo" makes sure that the password isn't visible while it is typed in.

It looks like you changed the prompt to your password. And then who knows what you typed in when the script tried to read PASSWORD.
# 11  
Old 12-23-2001
Just a thought... have you considered using "rdist"?

This program is specifically designed to maintain identical copies
of files over multiple hosts. It preserves the owner, group, mode,
and mtime of files if possible and can update programs that are
executing.

Check out...
http://www.magnicomp.com/rdist/

Warning!!!
Also check out the security vulnerabilities...
http://www.cert.org/advisories/CA-1996-14.html

Used properly and with care, it works great and can save you
lots of time and effort. Smilie
# 12  
Old 12-28-2001
I will take a look at rdist

Is rdist it similar to rcp and what are the advantages?
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #21
Difficulty: Easy
James Gosling developed the Java Programming Language.
True or False?

10 More Discussions You Might Find Interesting

1. Red Hat

Get latest update for RHEL systems

Hi all, I want to get latest package updates for my RHEL systems. I don't any account with RHN so that I can get updates from there. All I'm interested in knowing is that is it possible to get package updates without registering with RHN. And If yes then how. I have read about RHN satellite and... (3 Replies)
Discussion started by: Darshan Parab
3 Replies

2. SCO

Distinguish between file systems

Hello, is there any command in SCO unix by which I can check if the file system is HTFS or DTFS? Thanks (1 Reply)
Discussion started by: Mick
1 Replies

3. Shell Programming and Scripting

Copy file systems

I have to copy 3 file systems from one machine to another on the same local network. Total data is about 150gb. There is not enough free space on the source system to tar the files and then copy. I have to do this remotely, no tape or dvd I need to maintain permissions and ownership. I have... (2 Replies)
Discussion started by: jgt
2 Replies

4. What is on Your Mind?

From Systems Admin to Systems Eng.

I have been wondering how do Systems Administrators do the jump into Systems Engineering? Is it only a matter of time and experience or could I actually help myself get there? Opinions? Books I could read? Thanks a lot for your help! (0 Replies)
Discussion started by: svalenciatech
0 Replies

5. SCO

file systems table

hi Where is file systems table stored, I mean which config file from SCO 5.0.6? On linux is in /etc/fstab. (1 Reply)
Discussion started by: ccc
1 Replies

6. Red Hat

file systems may become read-only

Some of my file systems become read only. I want to find out when that happend. I checked /var/log/messages on that server and I dont see anything there. Is there any other ways to check that. I really need to find out when and how that happend. Thanks (4 Replies)
Discussion started by: s_linux
4 Replies

7. UNIX for Dummies Questions & Answers

file systems for unix

please someone give me 3 file systems for unix HP-UX version !!! thnks (2 Replies)
Discussion started by: androc
2 Replies

8. UNIX for Dummies Questions & Answers

File systems...

Hello guys, I am new in Unix world. I would like know, how Can I check which type of file system (GPFS, JFS) is on the AIX server. I have AIX 5.1. Could you anyone advice me? Thanks. (4 Replies)
Discussion started by: sokratis
4 Replies

9. UNIX for Dummies Questions & Answers

Resizing File-Systems

can someone tell me the basic steps needed to resize and existing filesystem that already has data on it? thanks I dont need to be pointed to a website so any real time real life advice or help will be wholly appreciated (4 Replies)
Discussion started by: TRUEST
4 Replies

10. UNIX for Dummies Questions & Answers

Checking file systems

I am trying to resurrect an old UNIX server without any joy, I do not have much UNIX experience any I don't understand the messages I am receiving. The system is telling me that it cannot go multi - user until the following file systems are checked //dev/rroot It gives me the procedure 1)... (1 Reply)
Discussion started by: ianie
1 Replies

Featured Tech Videos