Quote:
Originally posted by darthur
Here is the slightly modified version of the script I am using and what it gives me.
print -n "unixforme1"
stty -echo
read PASSWORD
stty echo
print
Darthur, I think you got this mixed up. If your password is "unixforme1" then we need to get that string into the variable called PASSWORD. One way to do that would be:
PASSWORD="unixforme1"
But another way would be to have the script ask for the password. That is the idea with:
print -n "Enter password -"
stty -echo
read PASSWORD
stty echo
print
When the script runs, it will type out "Enter password -". Then the user will type in "unixforme1". The "stty -echo" makes sure that the password isn't visible while it is typed in.
It looks like you changed the prompt to your password. And then who knows what you typed in when the script tried to read PASSWORD.