[HPADM] automated ftp with anonymous user id

From: Balaji Nathan (balajinathan2003_at_yahoo.com)
Date: 11/24/03

  • Next message: Kelly Choo: "[HPADM] Probems building openssh-3.7.1p2"
    Date: Mon, 24 Nov 2003 08:32:26 -0800 (PST)
    To: hpux-admin@DutchWorks.nl
    
    

    Hi admins,
    I have a ftp script which in turns call another script.
    The primary ftp script:
    #!/bin/sh
    #
    #
    DIR=/usr/local/bin
    FILEHOME=/adminlog/data
    LOG=/var/adm/data_ftp.log
    ERR=/var/adm/data_ftp.err
    # Check for system1data and do the ftp
    cd $FILEHOME
    if [ -f system1data ]
    then
        echo "Script started :`date`" > $LOG
        echo "ftp of system1data has started" >> $LOG
        ftp -in < $DIR/ftp_data.sct >> $LOG 2> $ERR
        STATUS=$?
        # If the result code is not 0 or the size of the error log is > 0
        if [ STATUS -ne 0 -o -s $ERR ]
        then
            echo "An error occured with the ftp" >> $LOG 2>> $ERR
            exit
        else
            echo "ftp of system1data has finished" >> $LOG
     fi
    else
        echo "system1data not found" >> $LOG
    fi

    The second script: (ftp_data.sct)
    # more ftp_data.sct
    open xxx.xxx.xxx.xxx
    user anonymous guest@unknown
    bin
    cd datafolder
    prompt
    lcd /adminlog/data
    mput syste*
    bye
    #

    this is the error log:
    Script started :Mon Nov 24 09:52:00 EST 2003
    ftp of system1data has started
    Connected to server. Logging in...
    220 kenny Microsoft FTP Service (Version 5.0).
    331 Password required for (null).
    530 User (null) cannot log in.
    Login failed.
    Login with USER first.
    Please login with USER and PASS.
    Interactive mode on.
    Local directory now /adminlog/data
    mput system1data? Please login with USER and PASS.
    Please login with USER and PASS.
    ftp of system1data has finished
    ---------------------------------------------------------------------------------------------------------------------
    If I run this script manually, then it takes the user id (anonymous) and password (guest@unknown); but not through the automated script.
    any idea why?
    Regards,
    Balaji

    ---------------------------------
    Do you Yahoo!?
    Free Pop-Up Blocker - Get it now

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: Kelly Choo: "[HPADM] Probems building openssh-3.7.1p2"

    Relevant Pages

    • Need help sending a password to ftp
      ... I need to create a perl/expect script that will telnet into a system ... then bring up ftp on that system to transfer some files over there. ... 530 Login incorrect. ...
      (comp.lang.perl.misc)
    • Problems getting ftp to take my password
      ... I need to create a perl/expect script that will telnet into a system ... then bring up ftp on that system to transfer some files over there. ... 530 Login incorrect. ...
      (comp.lang.perl.modules)
    • RE: FTP with user but no password with FTP -S:filename
      ... You can log into FTP with a blank password using a script, but the login is ... Alt+ means hold down the Alt key while entering in the number, ... Unfortunately, if any other entries are in the script file after the CRLF, ...
      (microsoft.public.inetserver.iis.security)
    • Re: Need help sending a password to ftp
      ... > then bring up ftp on that system to transfer some files over there. ... > can get the telnet session open. ... The script fails with: ... > 530 Login incorrect. ...
      (comp.lang.perl.misc)
    • Re: FTP delete problem
      ... the problem was a lock to a file that the ftp get worked, ... Bernard Cheah ha scritto: ... generate by schedule task. ... If i manually execute the script, the output wrote, but by schedule ...
      (microsoft.public.inetserver.iis.ftp)