How to unlock user admin

Hello,

i change in my company a password for user admin.
but someone still use it. after multi-try he locked my admin user.
right now, i m not able to use my user admin to connect to camunda.
i try to do unlock using API REST but it doesnt work

POST --> http://localhost:8887/engine-rest/user/admin/unlock
please help me if you know the issue.
Thanks a lot.

Hi @Hamza_DTW ,

Welcome to the Camunda forum :partying_face:

Execute the below query and restart the process application, so that you can setup the new password:

drop index ACT_UNIQ_AUTH_USER ON ACT_RU_AUTHORIZATION;
drop index ACT_UNIQ_AUTH_GROUP ON ACT_RU_AUTHORIZATION;	

delete from ACT_ID_MEMBERSHIP;
delete from ACT_ID_USER;
delete from ACT_ID_GROUP;
delete from ACT_RU_AUTHORIZATION;

commit;

alter table ACT_RU_AUTHORIZATION add constraint ACT_UNIQ_AUTH_USER unique (USER_ID_,TYPE_,RESOURCE_TYPE_,RESOURCE_ID_);
alter table ACT_RU_AUTHORIZATION add constraint ACT_UNIQ_AUTH_GROUP unique (GROUP_ID_,TYPE_,RESOURCE_TYPE_,RESOURCE_ID_);
1 Like

Hi @aravindhrs,

thanks a lot for your answer, but like this i will delete all user. and Camunda is used in prod environment, it will down for a long time like this.
may be there is another method to unlock admin user.

it’s an adhoc solution, you can try it only in non critical environments. Maybe you can try deleting the specific user by adding filter to the query.

Hi,

i solve my problem, using directly the database.
i execute this query :
update act_id_user set lock_exp_time_= NULL where id_ = ‘admin’
it works!!! :slight_smile:

1 Like