The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
.netrc and ftp magikalpnoi AIX 4 07-07-2008 04:22 AM
using .netrc sveera UNIX for Advanced & Expert Users 6 03-26-2008 04:58 PM
how to encript password in .netrc file getgopu25 Shell Programming and Scripting 1 06-13-2005 08:16 AM
Crontab refuses to save changes! fire>ant> UNIX for Dummies Questions & Answers 18 04-25-2005 04:56 PM
netrc file encrypted password ggowrish UNIX for Advanced & Expert Users 2 06-17-2004 06:15 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-19-2003
w33man w33man is offline
Registered User
  
 

Join Date: Sep 2003
Posts: 20
.netrc refuses password

Hi trying to ftp a printer to collect info but the ftp file shows that when it gets to password the mode is incorrect

both the login and the password are not compulsory (e.g. if the user hits the enter button twice the ftp session is initiated)

any ideas
  #2 (permalink)  
Old 09-19-2003
w33man w33man is offline
Registered User
  
 

Join Date: Sep 2003
Posts: 20
further info

sorry forgot to mention the .netrc file contains only the machine and login this allows me to get as far as the password in the ftp session (which only consists of me hitting the enter button)

when the line password is entered in the .netrc file, the error message appears
  #3 (permalink)  
Old 09-19-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,131
The printer is probably ignoring the user and password. Try using "bogus" as the user and password.
  #4 (permalink)  
Old 09-22-2003
w33man w33man is offline
Registered User
  
 

Join Date: Sep 2003
Posts: 20
Thumbs down

tried your suggestion Perdo but no joy

these are some of the options I have tried (and the results)

.netrc file
machine machinename
login bogus

".netrc" 2 lines, 30 characters
$ ftp machinename
Connected to machinename.
220 AXIS 540/542 FTP Printer Server V5.31 Feb 21 1997 ready.
331 User name ok, need password
Password: (at this point the enter key is hit)
230 User logged in

I need the password part above to be automatic


.netrc file
machine machinename
login bogus (anything entered here allows access)
password bogus (anything entered here allows access) but not automatically


".netrc" 3 lines, 48 characters
$ ftp machinename.
Connected to machinename..
220 AXIS 540/542 FTP Printer Server V5.31 Feb 21 1997 ready.
Error - .netrc file not correct mode.
Remove password or correct mode.
221 Goodbye.
ftp>
  #5 (permalink)  
Old 09-22-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,131
Did you read the text of the error message that you posted? Maybe you should try changing the mode of the .netrc file....

If you type "man netrc", you will probably see some language like "Its permissions should be set to disallow read access by group and others (see chmod(1))." You have not done that. That is why you are having problems.
  #6 (permalink)  
Old 09-22-2003
davidg's Avatar
davidg davidg is offline
Registered User
  
 

Join Date: Jul 2003
Location: Holland
Posts: 207
chmod 400 /path/to/.netrc

does the trick. You don't want to let anyone beside the owner read the .netrc file. It contains a users password, right.

Regs David
  #7 (permalink)  
Old 09-23-2003
w33man w33man is offline
Registered User
  
 

Join Date: Sep 2003
Posts: 20
Talking

Thanks lads as I said at the start Perdo just trying to get my head round this Unix stuff, but you two have helped a great deal. Any books forums or other paraphenalia you could recommend would be greatly appreciated, especially with regard to programming in Unix.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0