summaryrefslogtreecommitdiff
path: root/src/getpw
blob: 541679727410c405e66b22cb2debffde70c827f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# getpw -- read password

trap 'stty echo; echo; exit 130' INT

printf 'Enter password: ' > /dev/tty
stty -f /dev/tty -echo
read PASSWORD < /dev/tty
stty -f /dev/tty echo
echo > /dev/tty
echo "$PASSWORD"