vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello I need to ftp files from an AIX system to NT system on a daily basis. Will probably need a script to be run as a cron job to perform the job as the ftp session is to be initiated from the AIX. Has anyone done it before? Are there any setup to be done on the NT side? Appreciate any advice on how to perform this. Thanks. |
| |||
| "Reha" <rdhk3100@hotmail.com> schrieb im Newsbeitrag news:1rdaivgldo20ppr6p1ftrvadoq2o87310l@4ax.com... > Hello > > I need to ftp files from an AIX system to NT system on a daily basis. > Will probably need a script to be run as a cron job to perform the job > as the ftp session is to be initiated from the AIX. > > Has anyone done it before? Are there any setup to be done on the NT > side? > Appreciate any advice on how to perform this. pushing from AIX to NT: * You need a runing ftp-Server on the M$ side. ( NT-Workstation does not has one by default ) * Create a user with password on the NT-Server * Set filesystem permissions for that User on your NT-Server * Start your ftp transfer from your AIX-server HTH Hajo CATE AIX/RS6000 |
| |||
| Reha <rdhk3100@hotmail.com> wrote in message news:<1rdaivgldo20ppr6p1ftrvadoq2o87310l@4ax.com>. .. > Hello > > I need to ftp files from an AIX system to NT system on a daily basis. > Will probably need a script to be run as a cron job to perform the job > as the ftp session is to be initiated from the AIX. > > Has anyone done it before? Are there any setup to be done on the NT > side? > Appreciate any advice on how to perform this. > > Thanks. man netrc man crontab |
| |||
| Reha <rdhk3100@hotmail.com> wrote in message news:<1rdaivgldo20ppr6p1ftrvadoq2o87310l@4ax.com>. .. > Hello > > I need to ftp files from an AIX system to NT system on a daily basis. > Will probably need a script to be run as a cron job to perform the job > as the ftp session is to be initiated from the AIX. > > Has anyone done it before? Are there any setup to be done on the NT > side? > Appreciate any advice on how to perform this. > > Thanks. You could try using a .netrc file. Create a generic user, put the ..netrc file in the users home dir and have a script run in the crontab of the generic user to ftp to the NT machine. The .netrc file can be constructed to login and do a mput of the files you need uploaded to the NT box. |
| |||
| "Michael Orr" <morr@osceola.org> wrote in message news:4c61836.0307281029.2897c307@posting.google.co m... > Reha <rdhk3100@hotmail.com> wrote in message news:<1rdaivgldo20ppr6p1ftrvadoq2o87310l@4ax.com>. .. > > Hello > > > > I need to ftp files from an AIX system to NT system on a daily basis. > > Will probably need a script to be run as a cron job to perform the job > > as the ftp session is to be initiated from the AIX. > > > > Has anyone done it before? Are there any setup to be done on the NT > > side? > > Appreciate any advice on how to perform this. > > > > Thanks. > > You could try using a .netrc file. Create a generic user, put the > .netrc file in the users home dir and have a script run in the crontab > of the generic user to ftp to the NT machine. The .netrc file can be > constructed to login and do a mput of the files you need uploaded to > the NT box. You could do something like this from AIX (after setting up properly on NT): cd directory ftp >ftp.log 2>&1 <<ENDOFCOMMANDS open server.domain user joeblow password xyz prompt off binary (or ascii) cd /folder mput pattern quit ENDOFCOMMANDS Of course, set the permissions on the above script to 700 because of the password inside. PS: Password being sent is not encrypted. Consider SSH. |
| |||
| Reha <rdhk3100@hotmail.com> wrote in message news:<1rdaivgldo20ppr6p1ftrvadoq2o87310l@4ax.com>. .. > Hello > > I need to ftp files from an AIX system to NT system on a daily basis. > Will probably need a script to be run as a cron job to perform the job > as the ftp session is to be initiated from the AIX. > > Has anyone done it before? Are there any setup to be done on the NT > side? > Appreciate any advice on how to perform this. > > Thanks. Reha, Here's how I do it: I have a line in cron: 30 15 * * 1-5 /utilities/ftp/ftp.nt.sh 1>/utilities/ftp/nt.log This states that at 3:30PM on Monday through Friday run the script /utilities/ftp/ftp.nt.sh and direct it's standard output to >/utilities/ftp/nt.log (I'll explain why I do this in a minute.) Next here's the code for ftp.nt.sh. You'll need to provide your own specifics. #!/bin/ksh touch $HOME/.netrc chmod 700 $HOME/.netrc IP="555.55.5.55" # Create .netrc temporary file echo "machine $IP login tttt password passnt" > $HOME/.netrc ftp -v $IP <<! ascii # or binary cd nt_directory put /tmp/aixfile.log nt_filename quit ! rm $HOME/.netrc Explain: I use the standard output used in the cron statement to check and log the results of the FTP (1>/utilities/ftp/nt.log). You'll notice in the FTP script that I use a verbose FTP command (ftp -v), this allows the standard output in the cron statement to work and write to the nt.log file. I've also at times kicked off a background script from within the ftp script which sleeps for a certain amount of time and then reads the nt.log file to see if the transfer worked ("bytes transferred"). If the transfer failed I can page from that script to notify support, etc... This is my "poor man's" way of doing the automated transfers as opposed to an FTP server, but it has been pretty reliable for me. I just adjust the script going from mainframe to AIX to NT, etc... I also like to remove the .netrc file each time so it's not just sitting around. Hope it helps. Ritchie |
| |||
| Uzytkownik "Reha" <rdhk3100@hotmail.com> napisal w wiadomosci news:1rdaivgldo20ppr6p1ftrvadoq2o87310l@4ax.com... > Hello > > I need to ftp files from an AIX system to NT system on a daily basis. > Will probably need a script to be run as a cron job to perform the job > as the ftp session is to be initiated from the AIX. > > Has anyone done it before? Are there any setup to be done on the NT > side? > Appreciate any advice on how to perform this. > > Thanks. Maybe you should use expect? autoexpect command will create for you "makro" expect script which will do what you will record..... regards, Yoyo |
| ||||
| If you can get ssh on the NT box, you could use SCP automated like copying from the CLI. Also, smbmount for Windows shares and do a file copy. and... and... Reha wrote: > Hello > > I need to ftp files from an AIX system to NT system on a daily basis. > Will probably need a script to be run as a cron job to perform the job > as the ftp session is to be initiated from the AIX. > > Has anyone done it before? Are there any setup to be done on the NT > side? > Appreciate any advice on how to perform this. > > Thanks. > |
| Thread Tools | |
| Display Modes | |
|
|