[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [FW1] FTPing log files



    [ The following text is in the "iso-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set. Some ]
    [ characters may be displayed incorrectly. ]



Or use "user <username> password <password>" on a single line.

Cheers,

Dave Long
NCR UK

Statements and opinions in this email are mine and not necessarily NCR's.

> -----Original Message-----
> From: owner-fw-1-mailinglist@lists.us.checkpoint.com
> [mailto:owner-fw-1-mailinglist@lists.us.checkpoint.com]On Behalf Of
> Judson Main
> Sent: 05 October 1999 21:34
> To: Bryan Porter
> Cc: FireWall-1 Mailing List (E-mail)
> Subject: Re: [FW1] FTPing log files
>
>
>
> Use expect.
>
> Go to metasite.unc.edu.  Download the package for expect for your
> OS.  gunzip untar and install the package. (pkgadd -d . expect).
>
> A typical expect scripts looks like this:
>
> #!/usr/local/bin/expect
>
> spawn ftp <remoteserver>
> expect "Name"
> send "root\r"
> expect "Password:"
> send "<root's password>"
> expect "ftp> "
> send "cd /opt/CKPfw/log\r"
> expect "ftp> "
> send "mput test.*\r"
> expect "ftp> "
> send "quit\r"
>
> Obviously you are including your root password in a clear-text file,
> so it is preferable that you use a different user other than root.
> A shell script called by cron could move the log file to a temporary
> directory and change the user, invoke the expect script with the other
> user, then remove what's left behind in the temp directory.
>
> Finally, it is recommended that you use ssh for scp (secure copy)
> instead of ftp.  This way the password is encrypted.
>
> Jud.
>
>
>
> Bryan Porter wrote:
>
> > This seems like this should be a simple question - I am trying to script
> > ftping my log files from my firewall which is on Solaris to my
> ftp server on
> > an NT box. Everything works fine except I cannot script it to take the
> > password. The script inputs the user name but when it get to
> the password it
> > prompts me for the password rather than entering it. If I enter in the
> > password it looks at the password in the script as a command. I used the
> > example on phoneboy's website to no avail. Any help or examples of how
> > others are doing this with a similar environment would be
> appreciated. Here
> > is an example of my script
> >
> > /opt/CKPfw/fw logswitch test
> > ftp -nv machine-name <<_EOF
> > user username
> > password xxxxx (or just xxxxx)
> > lcd /opt/CKPfw/log
> > bin
> > mput test.*
> > bye
> > _EOF
> >
> > TIA
> > Bryan
> >
> >
> ==================================================================
> ==============
> >      To unsubscribe from this mailing list, please see the
> instructions at
> >                http://www.checkpoint.com/services/mailing.html
> >
> ==================================================================
> ==============
>
>
>
> ==================================================================
> ==============
>      To unsubscribe from this mailing list, please see the instructions at
>                http://www.checkpoint.com/services/mailing.html
> ==================================================================
> ==============
>



================================================================================
     To unsubscribe from this mailing list, please see the instructions at
               http://www.checkpoint.com/services/mailing.html
================================================================================


================================================================================
     To unsubscribe from this mailing list, please see the instructions at
               http://www.checkpoint.com/services/mailing.html
================================================================================