.netrc and Automatic ftp problem


 
Thread Tools Search this Thread
Operating Systems AIX .netrc and Automatic ftp problem
# 1  
Old 06-22-2009
.netrc and Automatic ftp problem

Guy's

We have two AIX servers

Server1 and Server2

and we have created user1 in Server1 and Server2 ...

and .netrc file was confiured under /home/user1 with the below line

machine server2 login user1 password abc1234567

-rw------- 1 user1 staff 159 Sep 28 2004 .netrc

When I try to do FTP to the belwo I'm getting the below message and its asking me user name and password !

ftp server2
Connected to server2
220 server2 FTP server (Version 4.2 Wed Apr 11 11:55:13 CDT 2007) ready.
Name (server2 :user1):

is there any missing or needed configuration need to be done on the server to let the FTP continuing to server2 without asking for password ?

edit by bakunin: corrected spelling in the title to make it findable by the forum search

Last edited by bakunin; 06-23-2009 at 08:07 AM..
ITHelper
# 2  
Old 06-22-2009
The messages suggest that you are logged in as "root" not "user1". The .netrc (or a copy of it) would need to be in root's home directory.
# 3  
Old 06-23-2009
This is an example message and it's similar what I got !

Why is asking me password ?!

seam that meaning is not reading .netrc file !!

Last edited by ITHelper; 06-23-2009 at 06:04 AM..
ITHelper
# 4  
Old 06-23-2009
You might want to re-read what methyl told you: you have placed the ".netrc" file in /home/user1 and perhaps there is a user account "user1" you want to use.

It might be that you accidentally started the ftp process not while you are user1 but root (or some other user, root is just the most probable one) and therefore your .netrc is not being used. Probably you are writing a script to run the whole process. Insert an "id" command directly above the "ftp" command to find out.

I hope this helps.

bakunin
# 5  
Old 06-23-2009
.netrc are configured under /home/user1 and I'm trying to do Automatic ftp from this directory and with user1 !

but still I'm getting this message and its asking me to login

ftp server2
Connected to server2
220 server2 FTP server (Version 4.2 Wed Apr 11 11:55:13 CDT 2007) ready.
Name (server2 :user1):

I think system is not reading the contains of .netrc !

Last edited by ITHelper; 06-23-2009 at 10:05 AM..
ITHelper
# 6  
Old 06-24-2009
Quote:
Originally Posted by ITHelper
Guy's



and .netrc file was confiured under /home/user1 with the below line

machine server2 login user1 password abc1234567

-rw------- 1 user1 staff 159 Sep 28 2004 .netrc

These Configuration of .netrc should be done in server1 in this example.
did you checked that?
# 7  
Old 06-24-2009
Yes , it's already been done in the both but still not working !

Last edited by ITHelper; 06-24-2009 at 09:12 AM..
ITHelper
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Specifying port for ftp when using .netrc

Hi, does anybody know if it is possible to specify a particular port for an FTP address within a .netrc file ? i have a script which opens the ftp to a machine and then instigates .netrc to login etc.. within .netrc i need it to go to a particular port to enable me to automate the dropping of... (2 Replies)
Discussion started by: forefather1977
2 Replies

2. Shell Programming and Scripting

Doubt in .netrc file for ftp login

Hi, i have a doubt. i am using .netrc file for login to a ftp server. ftp abc.ftp.com suppose i have 2 userid and password for the same server as shown below. which one is it going to read from the .netrc file? cat .netrc machine abc.ftp.com login admin1 password pass1 machine... (13 Replies)
Discussion started by: Little
13 Replies

3. UNIX for Dummies Questions & Answers

Performing Batch ftp without .netrc

How can I supply the userID/password when executing FTP in the batch mode? Using .netrc is not an option (prohibited per Corporate Policy). Thank you in advance. (1 Reply)
Discussion started by: compaamat
1 Replies

4. Shell Programming and Scripting

Automating ftp without .netrc

I'm writing a script which needs to run under an 'automation' account and there is already a .netrc machine definition for the server I need to connect to. If I create a new machine entry in the .netrc with a different account this will, of course, be ignored and the ftp session will connect to... (3 Replies)
Discussion started by: DeepakS
3 Replies

5. Shell Programming and Scripting

Automated FTP script using .netrc to multiple FTP servers

Hi all, I'm using the following script to automated ftp files to 1 ftp servers host=192.168.0.1 /usr/bin/ftp -vi >> $bkplog 2>&1 <<ftp open $host bin cd ${directory} put $files quit ftp and the .netrc file contain machine 192.168.0.1 login abc... (4 Replies)
Discussion started by: varu0612
4 Replies

6. Shell Programming and Scripting

FTP/nmap/.netrc

So... I'm trying to script and FTP Backup of some files from openVMS Alpha machine to a Unixware 7 machine. I decided to use .netrc to do all the FTP actions however when I send the nmap command. It pretty much gets ignored while even other things such "ascii", "case" etc.. get respected... (0 Replies)
Discussion started by: thesubmitter
0 Replies

7. AIX

.netrc and ftp

Hello all, I am using a .netrc to automatically access an ftp host. Here is the line I use... machine 412.blank.com login nw\mylogin password ******* when I use this command... ftp 412.blank.com I get... Connected to 412.blank.com. 220 server_7 FTP server (EMC-SNAS: 5.5.25.2)... (4 Replies)
Discussion started by: magikalpnoi
4 Replies

8. UNIX for Dummies Questions & Answers

.netrc and ftp issue

Ok guys (gals?) Im new here as a member, but have come here many times to find answers to questions. Have played with Unix (ATT Sys 5) and now Linux (RH)... I told myself I wanst going to ask for help on the current project..but.. I am down to what I think is the last issue: (and I KNOW the... (3 Replies)
Discussion started by: txdave
3 Replies

9. UNIX for Dummies Questions & Answers

.netrc multiple ftp jobs to same machine

I have an ftp user, which has been setup to run ftp jobs to a specific machine (different jobs). for the first job i created .netrc in the ftp users home directory and added the appropriate commands machine FTPBOX01 login user1 password xxx macdef init etc etc get file bye I use the... (3 Replies)
Discussion started by: hcclnoodles
3 Replies

10. UNIX for Advanced & Expert Users

Automatic FTP

Hi, We have a requirement to transfer(FTP) files created in a particular directory (In Solaris) to NT machine. Also this process neeeds to be automated. I belive a command MAIL in UNIX could be used to find new files created in a directory, but this just sends the file list to the logged user.... (5 Replies)
Discussion started by: shyamrk
5 Replies
Login or Register to Ask a Question