Operating System - HP-UX
1832964 Members
2729 Online
110048 Solutions
New Discussion

ftp from unix to windows 2000 server

 
mike worrell
Regular Advisor

ftp from unix to windows 2000 server

I have a script that has the following syntax
to ftp a file from a unix box to a windows server using a local user on the windows box
ftp -n serverwinx <user docm1 Passwdx
cd /tmp
put triggerfile
endFTP
We need to change the user to a domain acct user which would be nacorp\docm1
When I change that in the above script it will not work,
However if you do an interactive ftp it works like this for example
ftp serverwinx
naipaper\docm1 Passwdx
cd /tmp
put triggerfile
This works fine from the commandline, but you can't use in a script like this due to it asking you for user and password.
Are there any other options other than -n I may need to use .
Reason for this is they are doing away with the local accounts and making all use the domain accounts.
HELP
Thanks
2 REPLIES 2
Shannon Petry
Honored Contributor

Re: ftp from unix to windows 2000 server

In your script, try changing the "\" in the username to "\\". The shell interprets the \ as a special character marker. It's omitted when a special character is not there.

Not guaranteed to work, but it may.

Regards,
Shannon
Microsoft. When do you want a virus today?
Dave La Mar
Honored Contributor

Re: ftp from unix to windows 2000 server

Mike -
I would follow along with the previous post -

Suggestion #2

'naipaper\docm1'

or

export logname="naipaper\docm1"

ftp -n etc,etc
user '$logname' Passwdx

etc
etc

Best of luck.

dl
"I'm not dumb. I just have a command of thoroughly useless information."