Home » Infrastructure » Unix » password script in UNIX..
password script in UNIX.. [message #111026] Sat, 12 March 2005 04:08 Go to next message
darry
Messages: 3
Registered: March 2005
Location: Philippines
Junior Member
Hi All,

I'm working on a script that needs to prompt the user to enter a password. I could do this but i do not know how to have prompt that the user input would be invisible. I realy had a hard time finding the solution. Hope you guys can help me. Thank you very much. God bless.
Re: password script in UNIX.. [message #111039 is a reply to message #111026] Sat, 12 March 2005 09:15 Go to previous messageGo to next message
Frank Naude
Messages: 4566
Registered: April 1998
Senior Member
Try something like this:

echo -n "Enter password: "
stty -echo
read PASSWORD
stty echo
echo
echo "Your pasword is $PASSWORD"


Best regards.

Frank
Re: password script in UNIX.. [message #111077 is a reply to message #111039] Sun, 13 March 2005 09:04 Go to previous message
darry
Messages: 3
Registered: March 2005
Location: Philippines
Junior Member
thanks a lot frank. It works..

regards,
DArry
Previous Topic: SQLPLUS form UNIX KSH
Next Topic: Developer6i under Solaris
Goto Forum:
  


Current Time: Sat Jan 16 11:25:08 CST 2021