Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 07-31-2007, 06:43 PM   #1
Registered: Jan 2005
Location: Dallas, TX
Distribution: Slackware 14.1
Posts: 77

Rep: Reputation: 15
Use of special characters in .netrc file

Let me start by saying thanks in advance for any help and yes, I must do this via ftp.

OK, I can log into the ftp server manually, but login fails when called using the .netrc file which leads me to believe that it may have a problem parsing special characters. I do not have control over the server being logged into and have been told that the password must can not be changed (must contain a special character). My file looks something like this:

login Domain1\user1
password A-Password1
macdef init
cd /some/directory
get somefile.txt

Any help would be greatly appreciated.
Old 08-01-2007, 10:02 AM   #2
Registered: Dec 2005
Location: Nova Scotia
Distribution: Slackware
Posts: 70

Rep: Reputation: 24
Since you said "something like this" people are going to have to use their imagination and/or guess, so here's a guess.

One line has a backslash. Try changing it to a pair
of backslashes and see if that helps.

Good luck.
Old 08-01-2007, 10:04 AM   #3
Senior Member
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
are the access rights of .netrc correct? (It should be -rw-------)
Old 08-01-2007, 10:12 AM   #4
Registered: Jan 2005
Location: Dallas, TX
Distribution: Slackware 14.1
Posts: 77

Original Poster
Rep: Reputation: 15
Using two backslashes did the trick.
Changing the login line from
login Domain1\user1
login Domain1\\user1
gave me the desired results.

Thanks again for helping.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
removing file with special characters rsashok Linux - General 4 02-09-2010 04:08 PM
How to rename file while copying - and remove special characters corporal79 Linux - General 3 10-11-2007 04:16 PM
Special Characters SimeonV SUSE / openSUSE 14 07-07-2006 01:29 PM
File Copy Issue-Special Characters fortezza Linux - Software 1 11-14-2005 07:16 AM
Convert special characters in text file nyk Linux - Software 1 01-05-2005 03:20 PM

All times are GMT -5. The time now is 11:04 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration