Account Recovery
Use this page when no administrator can sign in — every admin account is locked, forgotten, or gone. Both methods need access to the server itself. Neither can be triggered from a browser.
Try the ordinary routes first. A single locked account is unlocked by another administrator, or by the Forgot password? link. See Account Security.
Option 1 — the command-line recovery tool
The recovery tool resets an existing account's password and clears its lockout. It reads the database connection from the application's own config file and talks to SQL Server directly. The API server does not have to be running.
- Open Command Prompt or PowerShell on the server.
- Change to the Primentra installation folder.
- Run:
node. Do not double-click the file. Windows does not know how to run an .mjs file and asks which program to open it with.The tool then:
- Prints the config path, the server, and the database it connected to.
- Lists every account with its email, name, status, failed-attempt count, and whether it is an administrator.
- Asks for the number of the account to reset.
- Asks for a new password of at least 8 characters, then asks you to confirm it.
- Saves the hashed password, reactivates the account, and resets the failed-attempt counter to zero.
- Offers to add the account to an administrator role, if it is not in one already.
If the database contains no accounts at all, the tool offers to create a new administrator instead and asks for an email address, a display name, and a password.
New administrator rights take effect at the next sign-in.
Option 2 — force the setup screen
This creates a brand new administrator account through the ordinary first-run setup screen. Existing accounts are untouched.
- Open
mds-config.jsonin the Primentra installation folder. - Set
forceSetupScreentotrue:
- Open Primentra in a browser. The Create your administrator account screen appears.
- Fill in the email, display name, and password, then click Create account & continue.
- The new account is added to the existing Administrators role and signed in.
Primentra sets forceSetupScreen back to false by itself once the account is created, so the screen is never shown to ordinary users.
When to use which
| Situation | Use |
|---|---|
| An administrator password is lost | The recovery tool |
| Every administrator account is locked | Either |
| You want a new administrator without touching existing accounts | Force the setup screen |
| Routine password change | Neither — use the Users page |
Why both need server access
A remote reset would be a way in for anyone who could reach the login screen. Requiring the file system or a command prompt on the server is what keeps that door closed.
Both actions are written to the audit log, so a recovery leaves a record.
Related
- Account Security — lockout and the ordinary unlock
- Authentication — the first-run setup screen
- User Management — manage accounts once you are back in
- Troubleshooting — connection problems the tool may report