The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to set up FTP Server with Active Directory cthinh Linux 0 05-21-2008 01:14 PM
Integrating unix with Active Directory nottrobin UNIX for Advanced & Expert Users 1 03-17-2008 05:11 PM
Similiar to active directory in Unix? blesets UNIX for Dummies Questions & Answers 5 01-13-2007 04:10 AM
Active Directory and UNIX rm -r * UNIX for Dummies Questions & Answers 1 06-01-2005 08:16 PM
unix and active directory Darwin Rodrigue Windows & DOS: Issues & Discussions 1 05-20-2005 04:34 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-09-2007
Cbish68 Cbish68 is offline
Registered User
  
 

Join Date: Mar 2006
Location: Woodstock, GA
Posts: 17
Question Automated FTP from Unix to Active Directory Server

Automated Unix to Windows Active Directory FTP

I have done many automated FTP scripts using the following logic:

===============================

echo "Starting the FTP transfer..."
{ echo "
open 192.168.1.100
user username password
ascii
put textfile.txt
close "
} | ftp -i -n -v > ftptransfer.log

===============================


But now i need to log into an FTP site on a Windows Active Directory server. The username that I need to pass to the script has a domain name and a backslash in front of it: "AD\username". I have tried escaping the backslash (AD\\username) and using various quoting combinations, but I cannot get the script to pass the username as AD\username. It usually gets sent as ADusername, without the backslash, which does not work.

Any ideas?
  #2 (permalink)  
Old 08-09-2007
Cbish68 Cbish68 is offline
Registered User
  
 

Join Date: Mar 2006
Location: Woodstock, GA
Posts: 17
FYI

Doing it this way is working for me now:


Quote:
HOST=192.168.1.100
USER='AD\\username'
PASSWD='pa$$w0rd'


echo "Starting the internal FTP transfer..."
ftp -n $HOST <<EOF
quote USER $USER
quote PASS $PASSWD
ascii
prompt off
put $FILE
quit
EOF
Cheers!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On




All times are GMT -4. The time now is 09:21 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0