23 lines
532 B
Bash
Executable File
23 lines
532 B
Bash
Executable File
#! /bin/bash
|
|
|
|
echo "-------------------------------------"
|
|
echo "Password Setup Script"
|
|
echo "-------------------------------------"
|
|
|
|
if gum confirm "Do you need to change your password?"; then
|
|
while true; do
|
|
if passwd; then
|
|
echo "Password successfully updated."
|
|
break
|
|
else
|
|
echo "Failed to update password."
|
|
|
|
if ! gum confirm "Would you like to try again?"; then
|
|
break
|
|
fi
|
|
fi
|
|
done
|
|
else
|
|
echo "Password change skipped."
|
|
fi
|