I am using a unix box that allows only a few people access. On this box I have several small scripts that I use to ftp files and to execute small commands at our hosts. I would like to know if there is a way to have the script pull the password from a text file so that when I change the password I would not have to change each individual script.
Here is a sample script that I use. In the @password field I would like this to point to the text file located in /home/b088/ISP directory and read the password.
Any help would be appreciated.
!/usr/local/bin/perl
use TE::BiLo;
use Net::FTP;
$store = shift;
$user = "root";
@password = ("help123"
$| = 1;
$te = TE::BiLo->new($store, $MYUSER, $MYPASS)
|| die "Unable to connect to store \"$store\"";
$te->sendln("cd /admin/script/"
$te->sendln("chmod 755 mkpos "
$te->sendln("echo ExitNow"
$te->expect("\nExitNow"
Here is a sample script that I use. In the @password field I would like this to point to the text file located in /home/b088/ISP directory and read the password.
Any help would be appreciated.
!/usr/local/bin/perl
use TE::BiLo;
use Net::FTP;
$store = shift;
$user = "root";
@password = ("help123"
$| = 1;
$te = TE::BiLo->new($store, $MYUSER, $MYPASS)
|| die "Unable to connect to store \"$store\"";
$te->sendln("cd /admin/script/"
$te->sendln("chmod 755 mkpos "
$te->sendln("echo ExitNow"
$te->expect("\nExitNow"