Hi.
I am trying to figure out how to manage "secure" automatic log in via curlftpfs to multiple sites via shell script.
I think I will use something like this:
curlftpfs ftp://example01.comassword@example01.com ~/ftp/example01.com/
curlftpfs ftp://example02.comassword@example02.com ~/ftp/example02.com/
curlftpfs ftp://example03.comassword@example03.com ~/ftp/example03.com/
.
.
.
I would like to be able to store the password in a secure place, like in a root only access folder. I still must be able to execute the script as user, so I can work in the ftp folders as the normal user.
The cool thing here would be, if I only will be prompted for a single password, for example root password.
Any hints ideas?
*EDIT*
After some thinking I have come up with the folowing solution.
make a shell script:
edit your read.txt
secure your secure folder or only read.txt
This should do the trick. If you have multiple ftp sites, you have access to them all by supplying only your root password. Still your passwords though not encrypted are only readable by root.
Any hints or tricks are very welcome
I am trying to figure out how to manage "secure" automatic log in via curlftpfs to multiple sites via shell script.
I think I will use something like this:
curlftpfs ftp://example01.comassword@example01.com ~/ftp/example01.com/
curlftpfs ftp://example02.comassword@example02.com ~/ftp/example02.com/
curlftpfs ftp://example03.comassword@example03.com ~/ftp/example03.com/
.
.
.
I would like to be able to store the password in a secure place, like in a root only access folder. I still must be able to execute the script as user, so I can work in the ftp folders as the normal user.
The cool thing here would be, if I only will be prompted for a single password, for example root password.
Any hints ideas?
*EDIT*
After some thinking I have come up with the folowing solution.
make a shell script:
Code:
#!/bin/sh pass1=`sudo sed -n '1p' ~/secure/read.txt` curlftpfs ftp://example1.com:$pass1@example1.com ~/ftp/example1.com pass2=`sudo sed -n '2p' ~/secure/read.txt` curlftpfs ftp://example2.com:$pass2@example2.com ~/ftp/example2.com/
Code:
secretpass1 secretpass2
Code:
sudo chown root:root secure/ -R sudo chmod go= secure/ -R
Any hints or tricks are very welcome