Recover the administrator account
Migrated page, not yet verified against the current code. Treat values, paths and examples as indicative until this notice is removed.
You can’t sign in as an administrator any more: the password is lost, the account is locked, or it was disabled. You give the account a new password from the server’s own command line, then sign in and choose your own password.
If the sign-in page says “sign-in refused: the security store is unavailable; try again in a moment”, do not recover the account: the store is reopening after a failed write and refuses everyone meanwhile. See If sign-in says the security store is unavailable.
Recovery has no web page and no API. It works only for someone who can stop eaxScada and open its data directory on the server. Whoever can do that controls the server anyway.
Before you start
Section titled “Before you start”- You can sign in to the server’s operating system and run the eaxScada program.
- You know the eaxScada work directory, the folder that holds
config\,data\andlogs\. A Windows service uses the folder of the executable. - You can open files in
data\security\: on Windows, as an administrator; on Linux, as root or as the account the server runs as.
-
Stop eaxScada: stop the Windows service or the systemd unit, or close the console where it runs. Recovery refuses to run while the server answers on its web port or holds its security store. That way it can never damage the store.
-
Run the program with
--reset-admin-password, from the work directory or with--workdir:Terminal window C:\eaxware\eaxScada\bin\eaxscada.exe --reset-admin-password --workdir "C:\eaxware\eaxScada"Terminal window sudo -u eaxscada /opt/eaxware/eaxscada/bin/eaxscada --reset-admin-password --workdir /var/lib/eaxware/eaxscada --config /etc/eaxware/eaxscada/config.yaml(The paths and the account
eaxscadaare those of the Linux release archive’s installer.)Run it as the account the server runs as. The new files in
data/securityare readable only by the account that writes them. On Linux, files written byrootfor a server that runs as another account stop the server at its next start. On Windows, the files also grantSYSTEMandAdministrators, so an administrator’s console works for a service that runs asLocalSystem.If the server starts with
--config, add the same--config. Recovery reads the configuration the same way the server does, so it finds the same security store (security.data_dir, by defaultdata/security).The account is
adminby default. To recover another account, add--user <name>. That account must hold the Administrator role, or recovery refuses. -
Read the output. It names the file that holds the new password. It never prints the password itself, because console output gets copied into tickets and chats.
Administrator password recovery: account "admin".The new password is in:C:\eaxware\eaxScada\data\security\initial_admin_password(protected ACL: this account, SYSTEM, Administrators)Open that file, start eaxScada, and sign in as "admin" with that password: you must then choose a new one, and the file is deleted. -
Open the file and copy the password (25 characters, in groups of five).
-
Start eaxScada and sign in with the account and that password. The sign-in page asks for a new password before it opens a session. Choose one of at least 12 characters. The server then deletes
initial_admin_password.
What recovery changes
Section titled “What recovery changes”On the account:
- a new random password, generated like a new installation’s first password and protected the same way: mode
0600on Linux, a protected ACL on Windows; - a password change is required at the next sign-in. Until then the account gets no session, even after a restart;
- the failed-attempt count and any lock, automatic or set by an administrator, are cleared;
- a disabled account is enabled again;
- its roles and groups don’t change.
Sessions opened before the stop are gone, because the server keeps them in memory. eaxPLC tokens already issued stay valid until they expire, at most 8 hours.
If the store has no administrator at all, recovery creates the account admin with the Administrator role. A new installation ends up in the same state.
What it records
Section titled “What it records”- The security audit trail gets an
ADMIN_PASSWORD_RECOVERYentry. It names the account, the operating-system user who ran the command, the host and the time. - Starter, Pro and Enterprise: the audit trail (
audit.duckdbinsecurity.audit_data_dir, by defaultdata/audit) gets the same entry. The licence is checked as the server would check it. When the server never made the trail, recovery creates it (its genesis record, then the entry). A trail that does not open (damaged, or held by another process) is left as it is, and the entry is only in the security audit trail. The output says what it did, for example “record 412 appended to …/audit.duckdb”. - Free: nothing is written to the audit trail (“not recorded there: this edition has no audit trail (Free); the security audit trail has the entry”).
When recovery refuses
Section titled “When recovery refuses”| Message | What to do |
|---|---|
eaxScada is running: stop eaxScada first |
Stop the server. The message names the port that answered or the lock on the store. Another program on the same web port also blocks recovery: stop that program too. |
no security store in ... |
Wrong folder. Give --workdir with the installation’s work directory, and --config if the server uses one. |
does not hold the Administrator role |
Choose an administrator with --user. The message lists the administrators. |
no account "..." |
The name is wrong. The message lists the administrators. |
signs in through ldap (or oidc, saml) |
That account has no local password. Recover a local administrator, or fix the account in the directory service. |
High availability
Section titled “High availability”Each node has its own security store. Recover the account on the node you want to sign in to, with that node stopped.