LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 03-11-2005, 12:44 AM   #1
DriveMeCrazy
Member
 
Registered: Mar 2004
Posts: 70

Rep: Reputation: 15
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:
...
echo open %targetHost% > ftpFile.txt
echo %userid% >> ftpFile.txt
echo %passwd% >> ftpFile.txt
echo cd "%targetPath%%mth%-%yy%/" >> ftpFile.txt
...

ftp -s:ftpFile.txt >> ftpLog%mm%%dd%%yy%.txt
Any idea what might be the cause?


Thanks in advance.
 
Old 03-14-2005, 12:05 PM   #2
Risc91
Member
 
Registered: Jan 2002
Location: Macomb, MI
Distribution: Ubuntu|Red Hat ES|AIX
Posts: 161

Rep: Reputation: 30
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.
 
Old 03-14-2005, 04:42 PM   #3
zorba4
Member
 
Registered: Feb 2004
Location: Paris
Posts: 398

Rep: Reputation: 31
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.
 
Old 03-15-2005, 02:18 AM   #4
DriveMeCrazy
Member
 
Registered: Mar 2004
Posts: 70

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Risc91
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.
yap.... its still in testing stages... hence using root passwd.
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?

 
Old 03-15-2005, 08:27 AM   #5
Risc91
Member
 
Registered: Jan 2002
Location: Macomb, MI
Distribution: Ubuntu|Red Hat ES|AIX
Posts: 161

Rep: Reputation: 30
Nope, it shouldn't need to be.

What FTP server are you using and what is the exact error you receive?
 
Old 03-18-2005, 11:21 PM   #6
DriveMeCrazy
Member
 
Registered: Mar 2004
Posts: 70

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Risc91
Nope, it shouldn't need to be.

What FTP server are you using and what is the exact error you receive?
Below is the output that i received.
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?


Code:
Connected to AIXBOX.

220 AIXBOX FTP server (Version 4.1 Tue Jul 6 21:20:07 CDT 2004) ready.
User (AIXBOX :(none)): ---> 
USER root 
331 Password required for root .
---> 
PASS 1root7
530 Login incorrect.

ftp> Invalid command.

ftp>  
---> cd /var
 
Old 03-19-2005, 07:31 AM   #7
zorba4
Member
 
Registered: Feb 2004
Location: Paris
Posts: 398

Rep: Reputation: 31
@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".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
send syslogs of aix box to remote rhel box gsr_kashyap AIX 2 04-05-2006 07:32 AM
FTP files from DOS box to LINUX box lobo1 Linux - Software 4 06-02-2005 11:57 AM
Can I tunnel X11 aps from an AIX (5.2) box to my linux workstation? davee AIX 3 04-01-2005 03:28 AM
Want to hook up a HP deskjet to AIX box boyd98 AIX 5 01-11-2005 04:25 PM
XP Box won't connect to internet thru RH9 Box (firewall/dhcpd), it can only ping fire Rhapsodic Linux - Networking 4 07-10-2004 04:02 PM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 06:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration