FTP from Wintel box to AIX box
Hi guys,
I am trying to ftp from a wintel box to an AIX box. All is perfect and fine through the manual way. However, when i placed the commands in script(bat file) and run them; login error come out. Below is my code, the userid used is root and everything has been double-check but still it prompt me an invalid password. I can't seem to figure out whats wrong, as manually there is no error with the userid and passwd indicating that the root is enabled on ftp access list. Its just the script that encountered error. Code:
... Thanks in advance. |
Are there any characters in your username or password that need to be escaped? I had a similar issue going the opposite way. (FTPing from an AIX box to a Windows FTP server). I had to escape a "\" that was in my user name.
Also, you may or may not already know this, but it is not a good idea to be logging into your FTP with the root user. Just a warning. |
By the way, why are you using ftp ? using rcp should be a better idea, then you would not have to write down passwords in a plain file, visible from anyone who should be able to browse your hard disk.
|
Quote:
requested a user a/c from the aix admin and still waiting. the passwd contain numerics in the front and back... dun think this needs to be escaped right? :confused: |
Nope, it shouldn't need to be.
What FTP server are you using and what is the exact error you receive? |
Quote:
As you can see when the code execute the password portion, it says login incorrect. By using the same userid and passwd and login manually to the FTP server, there's no problem at all. I have tried these manual and script execution methods a no. of time. So its impossible i entered the wrong password in the script. Any advice? :confused: Code:
Connected to AIXBOX. |
@Drivemecrazy :
1) Traditionnally, the password is not accepted from the script file, it's on the keyboard. So, if you input everything from the script, ftp client sends no password. Have a look at your ftp client documentation. On a Unix system, the password are in a file named "rc.inet", look in which file the passwords should be written in you wintel box. 2) I'm still convinced that you should not write the passwords in a file, because a hacker who is able to browse your hard disk will be able to simply read your passwords. That's why you should use "rcp" instead of ftp in a batch program. with rcp, the sender system is in charge of controlling user's password, and the destination systems allows a given user of the sending system for putting files in his directory. 3) If you have the root password of the AIX box, simply create a user : "smit users", add a user. Then "passwd myuser", give the password, telnet localhost in order to give the final password. This will allow you to test your thing. And when finished, smit users, remove the just created "myuser" and officially ask you administrator to create a user named "myuser". |
All times are GMT -5. The time now is 04:20 PM. |