Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!ukc!mucs!s2!dente From: dente@s2.uucp (Colin Dente) Newsgroups: comp.unix.wizards Subject: Re: FTP Message-ID: <5870@ux.cs.man.ac.uk> Date: 20 Apr 89 15:47:34 GMT References: <1451@dsacg1.UUCP> <43200074@uicsrd.csrd.uiuc.edu> Sender: news@ux.cs.man.ac.uk Reply-To: dente%s2%man.cs.ux@ukacrl.BITNET (Colin Dente) Organization: University of Manchester, UK Lines: 67 In article <43200074@uicsrd.csrd.uiuc.edu> kai@uicsrd.csrd.uiuc.edu writes: > >> /* Written 12:16 pm Apr 14, 1989 by ntm1169@dsacg1.UUCP in uicsrd.csrd.uiuc.edu:comp.unix.wizards */ >> >> How can you set up a script to do anonymous FTP at night, when the >> network traffic is lighter? > >It is possible to do this, but not too secure, since you have to put the >password in a file. It also has no capability for handling any random errors. > Surely it doesn't have to be *that* unsecure, as if you have a .netrc file containing the line: machine machinename login myaccountname password mypassword, then you can get away with something like: #!/bin/sh ftp << EOM cd comp.sources.unix/volume17/screen mget * bye EOM exit (The point being that .netrc has a mode of 500 or something like that - but then again, what's wrong with you original script being 700 - unless you can't trust root - but then you might as well give up and go home (or give root the sack)). I know this works 'cos I regularly use something very similar for printing files on one machine on another machine's printer (the machine with the printer is an Apollo running the Aegis print server which doesn't allow remote spooling ... unless I've missed something, that is...) However - and this is a rather major however - isn't the whole point of anonymous ftp (which is what the original article refers to) that you can get things without the honour of having an account on the relevant machine - so there is no security risk, as there is no password to hide - your script becomes something like: . . . ftp -n << EOM open illustriousmachinefullofarchivesi'dlovetogetholdof user anonymous (or guest or whatever) anyoldcrapforapassword . . . (Sorry about the vagueness about anonymous ftp - but being the wrong side of 'the pond' I don't have much call for such things - my machine may well have an official internet address - but I can't use it - moan moan grumble grumble grumble....) (Still true about the random errors though.......) (oh, and it goes without saying? you use at to run it in the wee small hours..) Colin =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | Colin Dente | JANET: dente%s2@uk.ac.man.cs.ux | | Dept. of Electrical Engineering | ARPA: dente%s2%man.cs.ux@ukacrl.BITNET | | University of Manchester | UUCP: ...!mcvax!ukc!man.cs.ux!s2!dente | | England | | |-----------------------------------------------------------------------------| | ======================================================================= | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=