RE: AUTOMATED FTP WITH TWO LOGINS

Christina.Allain_at_frx.com
Date: 06/07/04

  • Next message: Carl Ma: "lom programming API"
    To: Christina.Allain@frx.com, sunmanagers@sunmanagers.org
    Date: Mon, 7 Jun 2004 10:58:22 -0400 
    
    

    I have resolve this problem:

    Michael DeSimone made the below suggestion
    "The sleep 60 is a Unix command, which you know, but you are at an ftp
    prompt and that wont work. What you can do though is go to a shell to do
    the sleep.

    the only thing you would need to change is
    sleep 60
    to
    !sleep 60

    That should work, it does when I manually FTP".

    I added ! to the sleep and it work like a charm...

    Thanks for all that send me suggestions... I really appreciate all the
    efforts

    -----Original Message-----
    From: Christina.Allain@frx.com [mailto:Christina.Allain@frx.com]
    Sent: Thursday, June 03, 2004 11:53 AM
    To: sunmanagers@sunmanagers.org
    Subject: AUTOMATED FTP WITH TWO LOGINS

    Hello Gurus,

     

      I am writing an automated script that needs to be place in cron job. The
    problem with the script is that, I need to log in twice. Does anyone have
    similar script? Suggestions are welcome. Thanks in Advance

     

     

     

     If I ran the ftp manually it looks like:

     

     

     

    ftp -n rest.rest1.com

    Connected to rest.rest1.com.

    220-FTP authentication :

    220

    ftp> user test 13now

    331-Password:

    331

    220 narnia FTP server (Version wu-2.6.2+Sun) ready.

    ftp> user forestl ttree

    331 Password required for forestl.

    230 User forestl logged in. Access restrictions apply.

    ftp>

     

     

     

    When I wrote the script with single user it works fine but with two logins
    it failed on the second login. Below is the script:

     

    #!/bin/sh

    ftp -n rest.rest1.com << !EOF

    user test 13now

    sleep 60

    user forest1 ttree

    cd /outbound

    hash

    prompt

    bin

     

    mget call_sample.txt

    mget call_detail.txt

    mget header.txt

     

     

     

    quit

    !EOF

     

     

    Below is the error from the script:

     

    # ./auto_ftp.scribe.ksh -v

    530 Login incorrect.

     

    Login failed.

    ?Invalid command

    Hash mark printing on (8192 bytes/hash mark).

    Interactive mode off.

    call_sample.txt: No such file or directory.

    can't find list of remote files, oops

    call_detail.txt: No such file or directory.

    can't find list of remote files, oops

    header.txt: No such file or directory.

    can't find list of remote files, oops

     

    ____________________________________________________________________
    This e-mail and its attachments may contain Forest Laboratories, Inc.
    proprietary information that is privileged, confidential or subject to
    copyright belonging to Forest Laboratories, Inc. This e-mail is intended
    solely for the use of the individual or entity to which it is addressed. If
    you are not the intended recipient of this e-mail, or the employee or agent
    responsible for delivering this e-mail to the intended recipient, you are
    hereby notified that any dissemination, distribution, copying or action
    taken in relation to the contents of and attachments to this e-mail is
    strictly prohibited and may be unlawful. If you have received this e-mail in
    error, please notify the sender immediately and permanently delete the
    original and any copy of this e-mail and any printout.
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers

    ____________________________________________________________________
    This e-mail and its attachments may contain Forest Laboratories, Inc.
    proprietary information that is privileged, confidential or subject to
    copyright belonging to Forest Laboratories, Inc. This e-mail is intended
    solely for the use of the individual or entity to which it is addressed. If
    you are not the intended recipient of this e-mail, or the employee or agent
    responsible for delivering this e-mail to the intended recipient, you are
    hereby notified that any dissemination, distribution, copying or action
    taken in relation to the contents of and attachments to this e-mail is
    strictly prohibited and may be unlawful. If you have received this e-mail in
    error, please notify the sender immediately and permanently delete the
    original and any copy of this e-mail and any printout.
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: Carl Ma: "lom programming API"

    Relevant Pages

    • Re: IPFW almost works now -> stateful rules
      ... >> there is no rule for the port 21. ... > This has been discussed before: his FTP server is listening on a high port. ... The information contained in this e-mail message is confidential, ... the reader of this e-mail is not the intended recipient, ...
      (FreeBSD-Security)
    • Re: HTTP and FTP
      ... With most current HTTP servers, something like a htpasswd file is already ... However, if we are comparing to FTP, many FTP daemons, the ... The information contained in this e-mail message is confidential, ... the reader of this e-mail is not the intended recipient, ...
      (FreeBSD-Security)
    • Re: FTP from z/VM to z/OS JES Spool
      ... It seems I can't do what I was hoping for so I've adjusted my code to ftp ... If you are not the intended recipient of this e-mail, ... For IBM-MAIN subscribe / signoff / archive access instructions, ... send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO ...
      (bit.listserv.ibm-main)
    • Re: RE: RE: ftp not running in solaris 8
      ... 220 123 FTP server ready. ... intended recipient, or a person responsible for delivering it to the intended ... recipient, you are not authorised to and must not disclose, copy, distribute, ...
      (SunManagers)
    • Re: sendmail
      ... >> cut it up manually and ask your friend to concateneate the ... > well i can setup a ftp but then i have to leave my pc on all ... people need to sleep you know and i cant sleep whith ...
      (freebsd-questions)