Access recovery
When nobody can sign in to the console — a forgotten password, a locked
account, a lost phone, or no administrator left — you recover access from the
server itself. These commands run in the installation directory
(/opt/okyouin on the appliance and the ISO install), over SSH or on the
server’s console. The application must be running (./okyouin ps).
Every action is recorded in the audit log, with an actor such as
cli-reset or cli-create-admin.
| Situation | Command |
|---|---|
| An account is locked | ./okyouin unlock <user> |
| Someone forgot their password | ./okyouin reset-password <user> |
| No administrator can sign in at all | ./okyouin create-admin |
| A user lost the phone or authenticator | ./okyouin reset-mfa <user> |
Unlock an account
Section titled “Unlock an account”Repeated failed sign-ins lock an account. To see and clear locks:
./okyouin unlock # list locked console accounts./okyouin unlock alice # unlock one account./okyouin unlock --all # unlock every locked accountReset a password
Section titled “Reset a password”./okyouin reset-password aliceIt sets a new generated password, prints it once, clears any lock, ends every session of the account and requires a new password at the next sign-in.
To choose the password instead, type it at a prompt (asked twice):
./okyouin reset-password alice --ask-passwordIn scripts, pass it on one line of standard input with --password-stdin. Either
way the password never appears on a command line. (--password <value> also
works but leaves the password in your shell history; a warning says so.)
Create or repair an administrator
Section titled “Create or repair an administrator”When no administrator is left — deleted, disabled, or every password lost — this guarantees a working one:
./okyouin create-adminWithout a name it uses the initial administrator’s name from the install
(INITIAL_ADMIN_USERNAME). It:
- makes sure an administrators group exists;
- creates the user if missing, or repairs it: enables and unlocks it and ends all its old sessions;
- adds it to the administrators group;
- sets a password — generated and printed — that must be changed at the next sign-in.
To create a separate administrator with an e-mail address and a password you choose:
./okyouin create-admin ops --email ops@example.com --ask-passwordReset MFA (lost phone)
Section titled “Reset MFA (lost phone)”./okyouin reset-mfa aliceIt removes all of the user’s MFA enrolments — active and pending — and their pending challenges. When e-mail is configured, the user is told by e-mail that MFA was removed. If their groups require MFA, the next sign-in asks them to set up a new method.
To send the user a new setup link right away:
./okyouin reset-mfa alice --send-setup-linkThe same reset is available in the console on the user’s page, for administrators who can still sign in. See MFA.
The server’s own login
Section titled “The server’s own login”These commands need a shell on the server. On the appliance and the ISO install
that is the okyouin user, whose password was set in the first-boot wizard. If
that password is lost too, use your hypervisor’s or Linux distribution’s
standard procedure to reset a local password.
Prevent the next lock-out
Section titled “Prevent the next lock-out”- Keep at least two administrator accounts, each with its own second factor.
- Keep the generated initial password out of
.env: delete theINITIAL_ADMIN_PASSWORDline once you have signed in. - Keep SSH or console access to the server documented for your team: it is the way back in.