Unlock sysadmin

You have just installed OpenIAM and now accidentally locked the system admin preventing you from proceeding. In this case, if you do know the password, you can reset the account locked flag in the database using the following steps. The steps below assume that you are using the OTB MariaDB container, but the concepts apply to all databases.

  • SSH into your database container by first getting the CONTAINER ID using:
watch -n 5 'docker ps'
  • Connect to the container using the following command. You should copy the container id form the previous step
docker exec -it [database container id] bash

You will see a response like the example shown below

I have no name!@[container id]:/$
  • Connect to the openiam database on MariaDB using the command below
mysql -u IAMUSER -p openiam

You will be prompted for a password. This password can be found in the env.sh file.

Run the following sql commands to reset the account locked flag.

update USERS set SECONDARY_STATUS=null where USER_ID='3000';
update LOGIN set IS_LOCKED='0', AUTH_FAIL_COUNT='0', CHALLENGE_RESPONSE_FAIL_COUNT='0' where USER_ID='3000';
commit;

exit twice to leave MariaDB's commandline utility and the container. Restart OpenIAM using the steps below.

./shutdown.sh

Wait for all the containers to stop.

./startup.sh

Wait a few minutes for the containers come up like you did earlier in the installation process.