Networking Forums

Networking Forums > Computer Networking > Linux Networking > .netrc file -syntax error?

Reply
Thread Tools Display Modes

.netrc file -syntax error?

 
 
Doug Laidlaw
Guest
Posts: n/a

 
      12-07-2003, 04:14 PM
I have created a .netrc file as follows:
# Password is pulled from ~/.netrc
# Create ~/.netrc in an editor using one line per server like this:
machine home.vicnet.net.au user shlions password ******
machine ftp.gnome.org user anonymous password ******
# Then run: chmod 600 ~/.netrc

The password is the same in each (needed for shlions; the other is
anonymous.) From recollection, I did this for the benefit of ncftp.
But when I run wget, I get error messages as follows:

wget: /home/doug/.netrc:3: unknown token "user"
wget: /home/doug/.netrc:3: unknown token "shlions"
wget: /home/doug/.netrc:4: unknown token "user"
wget: /home/doug/.netrc:4: unknown token "anonymous"

If the syntax is right, wget should ignore those lines, because it is
connecting to an entirely different host. Where have I gone wrong?

Doug.

--
If I only had a little humility, I'd be perfect.
-Ted Turner

 
Reply With Quote
 
 
 
 
David Efflandt
Guest
Posts: n/a

 
      12-07-2003, 06:07 PM
On Mon, 08 Dec 2003, Doug Laidlaw <(E-Mail Removed)> wrote:
> I have created a .netrc file as follows:
> # Password is pulled from ~/.netrc
> # Create ~/.netrc in an editor using one line per server like this:
> machine home.vicnet.net.au user shlions password ******
> machine ftp.gnome.org user anonymous password ******
> # Then run: chmod 600 ~/.netrc
>
> The password is the same in each (needed for shlions; the other is
> anonymous.) From recollection, I did this for the benefit of ncftp.
> But when I run wget, I get error messages as follows:
>
> wget: /home/doug/.netrc:3: unknown token "user"
> wget: /home/doug/.netrc:3: unknown token "shlions"
> wget: /home/doug/.netrc:4: unknown token "user"
> wget: /home/doug/.netrc:4: unknown token "anonymous"
>
> If the syntax is right, wget should ignore those lines, because it is
> connecting to an entirely different host. Where have I gone wrong?


Maybe the syntax is not right. Search for .netrc in 'man ftp'. It shows
'login' instead of 'user' (maybe ncftp accepts either).

--
David Efflandt - All spam ignored http://www.de-srv.com/
 
Reply With Quote
 
Doug Laidlaw
Guest
Posts: n/a

 
      12-08-2003, 11:12 AM
David Efflandt wrote:

> On Mon, 08 Dec 2003, Doug Laidlaw <(E-Mail Removed)> wrote:
>> I have created a .netrc file as follows:
>> # Password is pulled from ~/.netrc
>> # Create ~/.netrc in an editor using one line per server like this:
>> machine home.vicnet.net.au user shlions password ******
>> machine ftp.gnome.org user anonymous password ******
>> # Then run: chmod 600 ~/.netrc
>>
>> The password is the same in each (needed for shlions; the other is
>> anonymous.) From recollection, I did this for the benefit of ncftp.
>> But when I run wget, I get error messages as follows:
>>
>> wget: /home/doug/.netrc:3: unknown token "user"
>> wget: /home/doug/.netrc:3: unknown token "shlions"
>> wget: /home/doug/.netrc:4: unknown token "user"
>> wget: /home/doug/.netrc:4: unknown token "anonymous"
>>
>> If the syntax is right, wget should ignore those lines, because it is
>> connecting to an entirely different host. Where have I gone wrong?

>
> Maybe the syntax is not right. Search for .netrc in 'man ftp'. It shows
> 'login' instead of 'user' (maybe ncftp accepts either).
>

Thanks David. The word "login" appears only once in man ncftp, as a noun,
not as a command. ncftp has its own bookmarks file. I suspect that the
..netrc file is now irrelevant, but I changed "user" to "login" and that
stopped the messages.

Doug.
--
This world is a comedy to those that think, a tragedy to those that feel.
-- Horace Walpole, 1769.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Server testing - need batch file syntax which will resume virtual machines from a paused state Spin Windows Networking 1 02-28-2008 02:54 AM
NETRC macro not xferring occasional file Matt Linux Networking 0 12-28-2005 07:06 PM
Ftp files filtered by modif date using macdef in .netrc Liza Linux Networking 4 04-19-2004 02:45 PM
Net Use syntax lynn Windows Networking 1 08-05-2003 10:49 PM
Re: .netrc Vilmos Soti Linux Networking 0 06-25-2003 04:19 AM



1 2 3 4 5 6 7 8 9 10 11