Re: Need to put backslash into a username in an FTP script
From: Alan Connor (zzzzzz_at_xxx.yyy)
Date: 04/28/05
- Next message: Stephane CHAZELAS: "Re: Need to put backslash into a username in an FTP script"
- Previous message: Stephane CHAZELAS: "Re: KORN SHELL FLOATING-POINT VARIABLE"
- In reply to: billadams1_at_gmail.com: "Need to put backslash into a username in an FTP script"
- Next in thread: Stephane CHAZELAS: "Re: Need to put backslash into a username in an FTP script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 28 Apr 2005 18:30:13 GMT
On comp.unix.shell, in
<1114707665.828981.193950@g14g2000cwa.googlegroups.com>,
"billadams1@gmail.com" wrote:
Okay. Since no one else has come up with a solution here,
I'll just rattle off some thoughts on the subject.
> I'm FTPing a file in a script to a Microsoft server which is
> requiring me to use the domain-name with a backslash then the
> username. For example:
>
> ftp -i -n <<- EOF
> open servername
> user domain\username password
> mput filename
> close
> quit
> EOF
>
> The Unix side doesn't like the backslash. It says "User
> domainusername cannot login", so I used another backslash as an
> indicator:
>
> user domain\\username password
>
> No dice. So I tried single quotes:
>
>
> user 'domain\username' password
I'd quote the entire right side.
>
> Nada! Please help.
>
>
> Thanks, -ba
>
If you are getting past the unix side with the quotes,
maybe it's the usual M$ requirement for CRLF line
terminations that's the problem.
You might try adding the CRs with ^V^M in vi.
Or use a more sophisticated and modern ftp client, like
ncftp, which is excellent and comes with utilities to
facilitate the use of scripts. It's free.
HTH,
AC
-- alanconnor AT earthlink DOT net Use your real return address or I'll never know you even tried to mail me. http://tinyurl.com/2t5kp
- Next message: Stephane CHAZELAS: "Re: Need to put backslash into a username in an FTP script"
- Previous message: Stephane CHAZELAS: "Re: KORN SHELL FLOATING-POINT VARIABLE"
- In reply to: billadams1_at_gmail.com: "Need to put backslash into a username in an FTP script"
- Next in thread: Stephane CHAZELAS: "Re: Need to put backslash into a username in an FTP script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|