← 返回命令列表

Linux command

kcadm.sh 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Login to Keycloak

kcadm.sh config credentials --server [url] --realm [master] --user [admin]

Create realm

kcadm.sh create realms -s realm=[name] -s enabled=true

Create user

kcadm.sh create users -r [realm] -s username=[user] -s enabled=true

Get users

kcadm.sh get users -r [realm]

Update user

kcadm.sh update users/[id] -r [realm] -s email=[email]

Set password

kcadm.sh set-password -r [realm] --username [user] --new-password [pass]

说明

kcadm.sh is the Keycloak Admin CLI. It manages Keycloak identity and access management configurations. The tool provides full administrative access to Keycloak. It creates users, realms, clients, and roles.

参数

config credentials
Configure authentication.
create _RESOURCE_
Create resource.
get _RESOURCE_
Get resource(s).
update _RESOURCE_
Update resource.
delete _RESOURCE_
Delete resource.
-r _REALM_
Target realm.
-s _ATTR=VALUE_
Set attribute.
--help
Display help information.

FAQ

What is the kcadm.sh command used for?

kcadm.sh is the Keycloak Admin CLI. It manages Keycloak identity and access management configurations. The tool provides full administrative access to Keycloak. It creates users, realms, clients, and roles.

How do I run a basic kcadm.sh example?

Run `kcadm.sh config credentials --server [url] --realm [master] --user [admin]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does config credentials do in kcadm.sh?

Configure authentication.