Restore admin user in PointsharpIdP via CLI

Prerequisites

  • IdP installation directory: /opt/PointsharpIdP

  • Systemd service name: pointsharpidp

  • IdP runs as a system user: pointsharpidp

  • TLS is enabled in keycloak.conf /opt/PointsharpIdP/conf/keycloak.conf

  • Pointsharp IdP has previously been built with kc.sh build

Steps:

  1. Stop IdP service.

    $ sudo systemctl stop pointsharpidp
  2. (Optional) Rebuild configuration if changed.

    $ sudo -u pointsharpidp /opt/PointsharpIdP/bin/kc.sh build
  3. Create admin user via CLI (interactive).

     $ sudo -u pointsharpidp /opt/PointsharpIdP/bin/kc.sh bootstrap-admin user --
    username admin

    You will be prompted to enter and confirm a password.

    You should see the confirmation:

    KC-SERVICES0077: Created temporary admin user with username admin
  1. Start Pointsharp IdP via systemd.

    $ sudo systemctl start pointsharpidp
  2. Ready to use.

    You can now log in to the admin console with:

    Username: admin

    Password: (the one you set in Step 3