hs.scripts/rollback/keycloak/set-demopw.sh

12 lines
444 B
Bash
Raw Normal View History

2024-10-24 12:50:47 +02:00
#!/bin/bash
set -e
. $HOME/scripts/env
echo "obtaining new admin token"
$HOME/latest/bin/kcadm.sh config credentials --server http://localhost:$kcport --user $kcadmin --password $kcadminpw --realm master
echo "setting password for demo account"
$HOME/latest/bin/kcadm.sh set-password --server http://localhost:$kcport --userid $kcuserid -r $kcrealm --new-password $newpw # -x (for stacktrace)
echo "demo user now has the password of $newpw"