ftp password issue


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ftp password issue
# 1  
Old 03-21-2003
ftp password issue

I think I may have put this in the wrong forum earlier

the script that follows is an extract from a post someone gave as an answer to a question on ftp within a script


/usr/bin/ftp ftpsiteaddress <<END
verbose on
bin
user username password
cd <directoryname>
put <filename>
mput <filename>
get <filename>
mget <filename>
bye
END

Also when you copy the above, ensure that there are no white-spaces after the END, otherwise you'll have errors.



Could someone tell me if the line in the script above for passing the username as clear text should be as follows. If my username is henrik and my password is celtic would the line be

user henrik celtic

When I try this I am prompted for a password and even when I give the correct one it comes back with an error. I know the .netrc file is the way to go but I want to get the syntax of this command right. I have tried a few variations on this and used the man file but am still getting errors. Once I have ftped in then I can switch user by using this command but what is being prompted back to me when I duplicate the script above is

Password:Name (qwerty:henrik) :

where qwerty is the hostname of the workstation in the script

Any thoughts ?
# 2  
Old 03-21-2003
Try adding the -n option on the script.

/usr/bin/ftp -n ftpsiteaddress <<END

You do have the user username password straight.

Post back with OS and version to insure this will work with your OS.
# 3  
Old 03-21-2003
Also, instead of "verbose on", you should be able to just use the -v option after /usr/bin/ftp
# 4  
Old 03-25-2003
Thanks lads. It worked a treat.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Get ftp without password

Dear Masters, I usually run bash to get file from ftp using command below (user : nobody, password : guest) #!/bin/bash cd /xx/xy/prog FILE="list_country.xls" /usr/bin/ftp -in 1.2.116.12 << END user nobody guest ascii cd /XYZ/ABC binary get $FILE quit END But in this case,... (9 Replies)
Discussion started by: radius
9 Replies

2. Shell Programming and Scripting

How to setup a password less ftp??

hi, i want to setup a password less FTP to a remote server so that i can ftp to a remote server without the password. i have setup a passwordless ssh and i am able to use scp commands to connect to the remote server without asking for the password. but when i try to ftp to the same remote... (6 Replies)
Discussion started by: Little
6 Replies

3. Shell Programming and Scripting

How: FTP in shell Script without asking password.

Hi In my shell script I am generating one text file and this text file I want to place in Mount point. THis mount point is havig access to Windows. I want to put the file in this mount point by using FTP rather normal cp or mv command from my shell script. This is in order to prevent... (5 Replies)
Discussion started by: shekharjchandra
5 Replies

4. UNIX for Advanced & Expert Users

remote ftp login without password

HI all, I need to post some files on to a clients machine and they said we can ftp without username and password. I do the same as a command line it works ftp <hostname>. but when I do that through a script it asks for user name and pasword. Can any one help me how to do a file ftp. ... (4 Replies)
Discussion started by: umathurumella
4 Replies

5. Shell Programming and Scripting

in ftp how to avoid username/password

hi all i am very new to unix. we had the below scenior test.bat file which contains ftp -s:logfiles.scr servername logfiles.scr contains username password cd path get file bye We had n number of batch(.bat files). which is having the same kind of scr file pointing... (10 Replies)
Discussion started by: nh1
10 Replies

6. HP-UX

Password issue

Hi, In my HP-UX, when I used cat /etc/passwd, ferdaus:*:198:20:ferdaus,pbapp,04-2013186,:/home/ferdaus:/usr/bin/sh pbapp:*:110:20:superadmin,penang,,:/home/pbapp:/usr/bin/sh May I know why * is in password part? There is no /etc/shadow files. Can I revert back /etc/passwd to show an... (6 Replies)
Discussion started by: aldosfox
6 Replies

7. Shell Programming and Scripting

ftp and user/password

I know the typical way to script automate an ftp session is to pass all of the commands to ftp, with something 'like' the following: echo USER $user echo PASS $pass My question concerns other methods or tricks people have used so that the username and ESPECIALLY the password are... (7 Replies)
Discussion started by: joeyg
7 Replies

8. UNIX for Dummies Questions & Answers

Can an FTP user change their own password?

If we set up FTP only users who can't log in with a shell (/bin/false type of shell) and set them up with a default password, like abc123 or something not secure, is there any way for the user to change their own password once they get on the system? (2 Replies)
Discussion started by: LordJezo
2 Replies

9. UNIX for Dummies Questions & Answers

Ftp account change password

How can I change the password from an ftp user account on a ssh server? Please give me simple instructions for a users who hasn't a lot of experience. :D Just the words in form of a list thanks a lot. (1 Reply)
Discussion started by: m.seidenberg
1 Replies
Login or Register to Ask a Question