02-07-2008
thanks for some of the ideas...
I will think about the suggestions.
It appears the ideas are related to 'when I control ftp'. However, I often need to pick up data from a site I do not control, but are given the username & password to authenticate. Therefore, when automating, the password must come from somewhere to be sent.
I was thinking of:
(a) Creating a script to store username & passwords to a 'text' file, but in a jumbled sort of way. For instance, username=joe & pasword=hi; so since joe is the 10th, 15th and 5th letters of alphabet, I could add the numbers 10+15+5=30. I would then write my file as
"joekdjfiekcnt9230gh7a6cfbn8snh86i"
start with username "joe", then skip to the 30th position to get the first character of password "h", skip two and read the "i", and be at end of line.
{There are lots of algorithms I could choose.}
(b) Then, my ftp scripts could call the related program to retrieve the info from the stored text file.
(c) Perhaps I could make my 'retrieval password' script protected so that it can only be executed by users, but not able to be read?
I could then logon to someone else's ftp site without embedding the username and password in the ftp script. Further, even if someone stumbled upon or knew of the text username-password file, they wouldn't necessarily know the logic to pull apart the text to learn the valid passwords.
Not perfect, but maybe an approach to reading a separate file for username/password pairs so that they are not embedded in the user scripts. Something a programmer could hack, but the general user, even if he/she printed out the script being run, would not see the username and password for the actions.
So... this is the direction of my thinking and what I am also searching for insight on from others.
Thanks.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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... (3 Replies)
Discussion started by: Henrik
3 Replies
2. UNIX for Dummies Questions & Answers
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
3. UNIX for Advanced & Expert Users
hi,
i have set up an FTP server in one of our systems. could some one tell me the procedure to set up the username and password for it to enable other users to access the server.
thanks (1 Reply)
Discussion started by: div
1 Replies
4. UNIX for Dummies Questions & Answers
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
5. UNIX for Advanced & Expert Users
Helo ,
I m using linux pam library for user and its password authentication.
I m creating new user and giving its password.I m giving password of 10 characters.now when I login in as that newly created user its ask me
$ su - ram
Password:
You are required to change your password immediately... (12 Replies)
Discussion started by: amitpansuria
12 Replies
6. Shell Programming and Scripting
hi , i am a still beginner in unix and specially in ftp i've written this script but my admin asked me that he don't want to see in my ftp neither user neither password , so i've created .netrc file where in it i've put machine name , user and pass but still included in my script , so if someone... (19 Replies)
Discussion started by: semaan
19 Replies
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
Can someone help in writing some script through which I can transfer file (scp) from root user in abc server to crt user in hfg server and can give the crt user password in script itself so that it doesn't prompt me every time for password (4 Replies)
Discussion started by: Moon1234
4 Replies
9. UNIX for Dummies Questions & Answers
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