2024-09-19 02:48:42 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
. ../../common-script.sh
|
|
|
|
. ./utility_functions.sh
|
|
|
|
|
|
|
|
clear
|
|
|
|
printf "%b\n" "${YELLOW}Change password${RC}"
|
|
|
|
printf "%b\n" "${YELLOW}=================${RC}"
|
|
|
|
|
|
|
|
username=$(promptUsername "" "root") || exit 1
|
|
|
|
password=$(promptPassword) || exit 1
|
|
|
|
|
2024-09-19 17:39:09 +01:00
|
|
|
printf "Are you sure you want to change password for $username? [Y/N]: "
|
|
|
|
read -r confirm
|
2024-09-19 02:48:42 +01:00
|
|
|
confirmAction || exit 1
|
|
|
|
|
2024-09-19 19:05:36 +01:00
|
|
|
echo "$username:$password" | "$ESCALATION_TOOL" chpasswd
|
2024-09-19 02:48:42 +01:00
|
|
|
printf "%b\n" "${GREEN}Password changed successfully${RC}"
|
|
|
|
|
|
|
|
checkEnv
|