.netrc refuses password


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers .netrc refuses password
# 1  
Old 09-19-2003
.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 Smilie
# 2  
Old 09-19-2003
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  
Old 09-19-2003
The printer is probably ignoring the user and password. Try using "bogus" as the user and password.
# 4  
Old 09-22-2003
PHP

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>
Smilie
# 5  
Old 09-22-2003
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  
Old 09-22-2003
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  
Old 09-23-2003
Computer

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.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

A function that refuses to run anywhere else but main()

Hi. I have some code, that for some reason, I could not post it here in this post. Here's the address for it: #if 0 shc Version 4.0.1, Generic Shell Script Compiler GNU GPL Version 3 Md - Pastebin.com First off, I used "shc" to convert the code from shell script to C. And The... (6 Replies)
Discussion started by: ignatius
6 Replies

2. UNIX for Dummies Questions & Answers

I have firewall rules to open ports, why telnet refuses connection?

Alright... this question comes from the fact that I'm trying to setup postfix to relay messages to Office 365 SMTP but its giving me connection refused... I read that if you have doubts if your port is open or not you should telnet to them so thats what I did. This is a Red Hat 6.3 box. My... (4 Replies)
Discussion started by: RedSpyder
4 Replies

3. Solaris

Sendmail refuses to send via relay

Hi I have two realtively identical Solaris zones. They both appear to have the same config in relation to sendmail. But, when I send a test email using mailx the first one sends via a mail relay and the other sends via localhost. I need them both to use the relay but can't figure out what is... (0 Replies)
Discussion started by: gregb
0 Replies

4. UNIX for Advanced & Expert Users

Virtual CDROM refuses to quit

Good day. I have a Sun Netra X4200 M2 server with AMI BIOS. When I performed a iostat -En, I noticed that the AMI Virtual CDROM had taken device id c0t0d0, however, I need c0t0d0 for the real CD/DVD device. So, I disabled the Virtual CDROM in the BIOS and rebooted. Lo and behold, the... (0 Replies)
Discussion started by: BRH
0 Replies

5. Debian

Postfix refuses POP clients after mysqlizing back end

Hello, I have attempted to mysqlize the backend of my postfix config. Since doing that I have not been able to connect to my server via pop clients. I am using courier as my pop server. I am suffering authentication failures even though the correct username and password are supplied. ... (0 Replies)
Discussion started by: bluethundr
0 Replies

6. Shell Programming and Scripting

sed script to generate hyperlinks refuses to work

Hi All, I'm new to the forum and not a programmer, but I'm writing a bash script to preprocess definitions of technical terms by inserting hyperlinks pointing to other pages in the glossary before the pages are posted to our server, using a standard naming convention for the pages. The... (3 Replies)
Discussion started by: markfgilliland
3 Replies

7. Shell Programming and Scripting

how to encript password in .netrc file

hi, I am using .netrc file WITH OUT encripting the password Code in .netrc file: ------------------- machine $SYSTEM NAME login FTFOA001 password 1Q2W3E4R how to encript password in .netrc file.(i should not use "1Q2W3E4R" as password). after encripting i should able to connect with... (1 Reply)
Discussion started by: getgopu25
1 Replies

8. UNIX for Dummies Questions & Answers

Crontab refuses to save changes!

I'm trying to create a new crontab entry for a user on a debian box but whenever I do a crontab -e or crontab -u username -e then edit the crontab (with vim as my default editor) and :wq. I get the error message: no crontab for username - using an empty one crontab: no changes made to crontab... (18 Replies)
Discussion started by: fire>ant>
18 Replies

9. UNIX for Advanced & Expert Users

netrc file encrypted password

Hi, I do not want the plaintext password to appear in the netrc file. So I want to encrypt the password. Is there a way to encrypt the password and still make ftp to use the netrc ? Thanks in advance. -Gow:confused: (2 Replies)
Discussion started by: ggowrish
2 Replies
Login or Register to Ask a Question