First, we need to get an encrypted version of the old password:
echo '87sa!9s8op12mn' | openssl enc -des -a -e -pass pass:MyMemorablePasswordThat returns:
U2FsdGVkX1/ewCk0xYTJF33NCLpJ6eULDqQC60Hh3oY=So now, in our script, we can simply do this:
PASSWORD=$(echo U2FsdGVkX1/ewCk0xYTJF33NCLpJ6eULDqQC60Hh3oY= | openssl enc -des -a -d);When that runs, it will ask us for OUR password, which it will then use to decrypt the actual password.
No comments:
Post a Comment
Comments welcome, but they are expected to be civil.
Please don't bother spamming me. I'm only going to delete it.