1827808 Members
2042 Online
109969 Solutions
New Discussion

Re: FTP Script

 
SOLVED
Go to solution
Steve Entwistle
New Member

FTP Script

Whenever I execute the following FTP commands I get the subsequent error. Does anyone know whether this a result of the server or the client? (I'm executing them manually to try to debug a scripted version)

ftp -niv
ftp> open xxx.xxx.xxx.xxx
Connected to xxx.xxx.xxx.xxx.
220-FTPD1 IBM FTP aa aaaa at aaaa, 11:02:45 on 2005-09-15.
220 Connection will close if idle for more than 15 minutes.
Remote system type is MVS.
ftp> user XXXXX
500 User Exit denies Userid '' from using Command 'USER'.
Login failed.

10 REPLIES 10
RAC_1
Honored Contributor

Re: FTP Script

Are you allowed to do ftp? check it - /etc/ftpd/ftpusers file.
There is no substitute to HARDWORK
Muthukumar_5
Honored Contributor

Re: FTP Script

I think remote machine is denying to login with XXXXX user. Can you try with root there as,


ftp -niv
ftp> user root

what u r getting?

hth.
Easy to suggest when don't know about the problem!
Borislav Perkov
Respected Contributor

Re: FTP Script

Hi Steve,

Also see the /etc/ftpd/ftpaccess file, or even /etc/passwd to see if that user is alowed to login on that machine.

Regards,
Borislav
Steve Entwistle
New Member

Re: FTP Script

Sorry I didn't make it very clear on reflection.
I don't have an ftpusers file as my HPUX box is the client end of the connection and I don't have any control over the remote (MVS) server. However if I start a "regular" ftp session without -niv then I can connect without any problems.
Arunvijai_4
Honored Contributor

Re: FTP Script

I beleive you have problem with auto login in AIX, check that server.
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: FTP Script

what is your ftp version? May be you are getting problem with prompting.

-ni is used for interactive prompting.

ftp -i -nv <<-EOF
user
ls
bye
EOF

Is it working there?

what is your os version?

hth.
Easy to suggest when don't know about the problem!
Steve Entwistle
New Member

Re: FTP Script

My scripted version is coded as you suggest but fails, which is why I've been trying each step manually. The o/s version is 10.20 and interestingly, the same script works without fault when it is run from a DG/UX system, with the same login credentials.
Muthukumar_5
Honored Contributor

Re: FTP Script

I think auto login is not allowed to MVS. Every example for using ftp to MVS is simply asking to use prompt. Example: http://www.isc.ucsb.edu/tsg/ftp-to-mvs.html

hth.
Easy to suggest when don't know about the problem!
Doug O'Leary
Honored Contributor
Solution

Re: FTP Script

Hey;

The remote system is the one generating the error so, unless you know the admin of the MVS box, you're a bit out of luck.

I find it curious that the same commands work from a DG/UX box. There might be some type of security that allows the user@DG/UX to run the command but prohibits anyone else. I'm not familiar with MVS, so I don't know if that's the case or even possible; however, that's what its looking like.

You might try a ~/.netrc file (600 perms, remember) to see if that will enable you to auto-login. If that works, you should be able to run the rest of your script w/o the user/password commands...

HTH;

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Steve Entwistle
New Member

Re: FTP Script

Many thanks for your responses. After creating .netrc the auto login negates the need for specifying the user and password details within my script. I can then execute subsequent FTP commands within the session without any further problems.