variables - Using a user-entered password in a ksh script -
on aix server have ksh script prompts user password, saves password temp file, , uses contents of temp file supply password sudo command being run on remote servers (to run remote script).
i'm not happy approach , prefer user's password not recorded in file.
here simplified version of in script...
!/bin/ksh stty -echo printf "password: " read rslt stty echo printf "\n" echo $rslt>./rslt svrx in svr1 svr2 svr3 svr4 svr5 svr6 svr7 svr8 svr9 print "connecting $svrx , getting stationlist..." ssh -q $svrx /usr/local/bin/sudo -s /home/myuserid/scriptname <./rslt >${svrx}.output.txt print "done" done rm ./rslt
my question this; there way script can use password in variable rather reading file i'm doing utilizing "sudo -s" ?
i don't have permissions required install expect or other software or utils.
many thanks.
Comments
Post a Comment