Documentation
Getting Started
Data Grid
Modeling
Business Rules
Approvals
Administration
Integration & API
Installation
Migrating from MDS
Architecture

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.

  1. Open Command Prompt or PowerShell on the server.
  2. Change to the Primentra installation folder.
  3. Run:
node scripts/recover-admin.mjs
Type the full command, including 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:

  1. Prints the config path, the server, and the database it connected to.
  2. Lists every account with its email, name, status, failed-attempt count, and whether it is an administrator.
  3. Asks for the number of the account to reset.
  4. Asks for a new password of at least 8 characters, then asks you to confirm it.
  5. Saves the hashed password, reactivates the account, and resets the failed-attempt counter to zero.
  6. 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.

  1. Open mds-config.json in the Primentra installation folder.
  2. Set forceSetupScreen to true:
"forceSetupScreen": true
  1. Open Primentra in a browser. The Create your administrator account screen appears.
  2. Fill in the email, display name, and password, then click Create account & continue.
  3. 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.

The existing members of the Administrators role are kept. Adding a recovery admin does not remove anyone else.

When to use which

SituationUse
An administrator password is lostThe recovery tool
Every administrator account is lockedEither
You want a new administrator without touching existing accountsForce the setup screen
Routine password changeNeither — 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.

Ready to get started?

Start managing your master data with Primentra today.

View Pricing
Account Recovery | Users, Roles & Security | Docs | Primentra