Created
February 15, 2019 00:25
-
-
Save jorke/bca99132a0d1f6b02a756445931dda06 to your computer and use it in GitHub Desktop.
force iam user to reset password
This file contains hidden or 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
for x in $(aws iam list-users --output text --query 'Users[*].UserName'); | |
do | |
echo "$x?" | |
read choice | |
case "$choice" in | |
y|Y ) echo $(aws iam update-login-profile --user-name $x --password-reset-required);; | |
n|N ) echo "no";; | |
* ) echo "invalid";; | |
esac | |
; | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment