This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Intended usage: ./change-password.pxr <username> <oldPass> <newPass> | |
retcode ERR_SSH_FAILED 1 "Failed to ssh to $host: $output" | |
retcode ERR_UNKNOWN_PWD_OUTPUT 2 "The `passwd` command returned an unexpected output: $output" | |
retcode ERR_WRONG_PASSWORD 3 "The given oldPass is wrong" | |
retcode ERR_PASSWORD_DIDNT_SUCCEED 4 "The `passwd` command accepted the input but didn't succeed: $output" | |
retcode ERR_CONFIRM_DIDNT_SUCCEED 5 "The `passwd` confirmation accepted the input but didn't succeed: $output" | |
retcode ERR_UNKNOWN_SUDO_OUTPUT 6 "The `sudo` command returned an unexpected output: $output" | |
ssh andrew@foo.bar.baz |