리소스 변경
This commit is contained in:
7
roles/cmoa_password/files/password.sh
Executable file
7
roles/cmoa_password/files/password.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
KEYCLOAK_HOST=http://10.10.43.210:31082
|
||||
ADMIN_USER_OLD_PASSWORD="cmoaA13!#"
|
||||
ADMIN_USER_NEW_PASSWORD=admin
|
||||
|
||||
TOKEN=$(curl -s -X POST -H 'Content-Type: application/x-www-form-urlencoded' -d "username=admin&password=$ADMIN_USER_OLD_PASSWORD&client_id=admin-cli&grant_type=password" "$KEYCLOAK_HOST/auth/realms/master/exem/openid-connect/token" | jq -r ".access_token" ;)
|
||||
|
||||
curl -s -X PUT -H "Authorization: Bearer $TOKEN" -H "Content-type: application/json;charset=UTF-8" -H 'Accept: application/json' "$KEYCLOAK_HOST/auth/admin/realms/exem/users/admin/reset-password" -d "{\"type\":\"password\",\"value\":\"$ADMIN_USER_NEW_PASSWORD\",\"temporary\":false}"
|
||||
Reference in New Issue
Block a user