fuss-fucc / utils / gen-root-changepassword.sh @ master
| 1 |
#!/bin/bash
|
|---|---|
| 2 |
|
| 3 |
read -s -p "Clients password: " pw1 |
| 4 |
echo
|
| 5 |
read -s -p "Confirm clients password: " pw2 |
| 6 |
echo
|
| 7 |
|
| 8 |
if ! [ "$pw1" = "$pw2" ] ; then |
| 9 |
echo "Password mismatch! Please retry" |
| 10 |
else
|
| 11 |
perl -e "print crypt(\"$pw1\", \"salt\")" > clientScripts/new_root_pw |
| 12 |
fi
|
| 13 |
|
| 14 |
unset pw1
|
| 15 |
unset pw2
|