cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: .netrc information not fully recognized

From: Doug McNutt <douglist_at_macnauchtan.com>
Date: Mon, 22 Feb 2010 18:15:38 -0700

At 15:01 -0700 2/22/10, Jason Friedman wrote:
>Hi,
>
>spjsf_at_infodev1:~> uname -a
>SunOS infodev1 5.10 Generic_137111-02 sun4u sparc SUNW,Sun-Fire-V890
>
>spjsf_at_infodev1:~> cat .netrc
>machine den-wiki.den.ofi.com login wikiuser password myPassword
>
>spjsf_at_infodev1:~> curl --user wikiuser:myPassword
>ftp://den-wiki.den.ofi.com/some_file
>data line 1
>
>So, here is my problem:
>
>spjsf@infodev1:~> curl -v --netrc ftp://den-wiki.den.ofi.com/some_file
>password: <-- I just hit the Return key here
>* About to connect() to den-wiki.den.ofi.com:21
>* Connected to den-wiki.den.ofi.com (172.17.36.254) port 21
>> USER wikiuser
>> PASS
>* the username and/or the password are incorrect
>* Closing connection #0
>curl: (10) the username and/or the password are incorrect
>
>Note the USER line: curl is apparently picking my username (wikiuser)
>from the .netrc file, but not the password.

Have a look at DNS servers along the route.
den-wiki.den.ofi.com --> 66.114.124.140 on this machine but a reverse lookup fails as does 172.17.36.254. Whois fails for all three options.

What's in your /etc/hosts file?

I use -n all the time but everything in ~/.netrc has a dotted decimal IP address.

I'm pretty sure that all versions of curl ignore permissions on .netrc but it's supposed to be r for you with everything else turned off except when you want to edit it.

you might try username:password@ftp://den-wiki.den.ofi.com/some_file.

-- 
--> From the U S of A, the only socialist country that refuses to admit it. <--
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-23