Repository navigation
Replacement for add-user-keycloak.sh #10302
Replies: 4 comments 5 replies
|
@fmarchioni There isn't. Isn't it enough to import a realm instead? |
|
Same issue here. Running on linux server without desktop environment and Xterm forwarding is not possible nor allowed. BTW, calling the page remotly http://node_ip:8080/ shows me this outdated info.
|
|
Thanks for your replies to my query.
I was wondering if the older add-user-keycloak.sh could be restored with a
shell script using kcadm.sh
Something like this:
kcadm.sh config credentials --server http://localhost:8080 --realm master
--user $KEYCLOAK_ADMIN --password $KEYCLOAK_ADMIN_PASSWORD
kcadm.sh create users -s username=$1 -s enabled=true -r master
kcadm.sh set-password -r master --username $1 --new-password $2
Overall, it might help to have a script for quickly adding an extra user in
the master realm.
Il giorno mar 22 feb 2022 alle ore 16:15 Wolfsrudel <
***@***.***> ha scritto:
… It's already mentioned in the documentation:
https://www.keycloak.org/docs/latest/server_admin/index.html#creating-the-account-remotely
—
Reply to this email directly, view it on GitHub
<#10302 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKBNDPRLENGNBPJSM7LKHLU4OSCXANCNFSM5OVHLMVA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
The main problem seems to me that
#!/bin/bash
/opt/jboss/keycloak/bin/add-user-keycloak.sh -u test_user_1 -p test_password --realm test_realm \
--roles role1,role2
/opt/jboss/keycloak/bin/add-user-keycloak.sh -u test_user_2 -p test --realm test_realm \
--roles role2,role3
/opt/jboss/tools/docker-entrypoint.sh -b 0.0.0.0 -Djboss.bind.address.private=127.0.0.1Since it doesn't seem to be possible to export a realm including the users in the admin UI that would mean I know have to either:
or
I find both options to be a lot of effort for the simple task of adding test users for local development inside a Docker container. I'm kind of wondering how this seems to break only my workflow. Am I doing something fundamentally wrong? |
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
I'm using the following script to add users for testing purpose:
/opt/jboss/keycloak/bin/add-user-keycloak.shIs there a replacement command to add users from the Command Line?
Thanks
Francesco
All reactions