Initial commit: git-hangman-lab and keycloak-hangman-lab skills

This commit is contained in:
lyn
2026-03-21 14:04:00 +00:00
commit ac457349af
18 changed files with 964 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
#!/bin/bash
# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
# Get username from pass_mgr
username=$(pass_mgr get-username --key keycloak)
if [[ -z "$username" ]]; then
echo "Error: No username found in pass_mgr for key 'keycloak'"
exit 1
fi
realm="Hangman-Lab"
# Generate new password
password=$(pass_mgr generate --key keycloak --username "$username")
# Update password via kcadm
"$SCRIPT_DIR/kcadm" set-password -r "$realm" --username "$username" --new-password "$password"
echo "Password updated for user: $username (realm: $realm)"