Possible Duplicate:
How to hide commands typed in a Linux shell?
Reading passwords without showing on screen in Bash Scripts
I would like to take a password as input, but I want user to be able to enter it just like other utilities handle it i.e. the characters doesn't appear on the screen. I tried searching regarding this, but found no exact answer.
I need to take in a variable, and then I would match the input with a pre-defined standalone password hard-coded variable sourced from one of the config files at the beginning of the script.
Expected behaviour
$./startScript
username: mtk
password: ********
*
shown as placeholders. I need this part to be invisible. Currently the password is displayed as the user types it.
How to do this?