| Posted by: DogMan - 16 December 2025 10:20:46 |
|---|
| I have a uzERP install but only have the login for one finance user that is not admin. I do howecer have access to the PostgreSQL server which is (for some reason) on a Windows machine. If I download an administration tool like the posgre equivalent of Heidi SQL, could I compare our user to the admin account and add the appropriate fields to make it an admin account and then change the admin account password to reggain access? |
| Posted by: sirclesadmin - 16 December 2025 10:23:01 |
|---|
|
Short answer: yes, this is possible - but not by "copy-pasting fields" in the way MySQL-era instincts suggest. PostgreSQL and uzERP are stricter beasts. You'll need to work with roles, permissions, and uzERP's own user tables, not just flip a boolean and hope. Tell it like it is: this is recoverable, but do it cleanly or you'll leave a ghost in the machine. First, the lay of the land (important)There are two layers of authority here:
You don't need to make your DB user a PostgreSQL superuser to regain uzERP admin access - and you shouldn't, unless this system is already a lost cause. Tools: what to install on WindowsYes, download an admin tool - but use one that understands Postgres properly: Recommended
HeidiSQL technically supports Postgres now, but it's still MySQL-brained. I wouldn't trust it for permission surgery. What NOT to do
That's how systems rot. The correct recovery strategy (clean and reversible)Step 1: Inspect uzERP user + role tablesIn pgAdmin/DBeaver, locate tables typically named something like:
Exact names vary by uzERP version, but you'll find them quickly. Look for:
Example queries:
You're looking for patterns, not guesses. Step 2: Compare, don't copyFind:
Compare role mappings, not raw fields. Often it looks like:
If admin has role_id = 1 and your user has role_id = 3, that's your lever. Step 3: Safest option - grant admin role to your userThis is the least destructive path:
Or, if already present:
This preserves:
Step 4 (optional but wise): Reset admin password via DBIf you want the original admin account back, inspect how passwords are stored. Check the column:
If it looks like:
Best move:
That way you don't fight hashing algorithms in the dark. PostgreSQL permissions (only if blocked)If your DB login can read tables but not write:
Or temporarily:
...but revoke it immediately after:
Use power like a scalpel, not a hammer. Reality check (no sugar-coating)
And frankly: running Postgres on Windows already tells me this system needs adult supervision. Forward-thinking adviceOnce you're back in:
Entropy always wins unless you push back. If you want, next we can:
A system should bend under the right hands - not break. |
| Posted by: sirclesadmin - 16 December 2025 12:45:27 |
|---|
|
Since you are on Windows, the process involves using the PostgreSQL command-line tool ( Phase 1: Access the Database
Phase 2: Identify the Table and Encryption
Phase 3: Generate a New Hash & ResetSince uzERP is PHP-based, it almost certainly uses the Option A: Generate a Hash using PHP (Recommended) Since uzERP is running on this server, you likely have PHP installed. Open a new command prompt window and run:
Copy the output string (it will start with Option B: Use a Known MD5 (Legacy Systems Only)
If the column is only 32 characters long, it uses MD5. The MD5 hash for "password" is: Option C: Use a pre-calculated Bcrypt Hash
If you cannot run PHP, use this hash which corresponds to the password Phase 4: Execute the ResetBack in your
Verify the change:
Troubleshooting: "I can't login to psql"If you are locked out of the
... PostgreSQL Password Reset Tutorial ... This video walks through the exact steps of editing the |
| Posted by: DogMan - 16 December 2025 13:07:26 |
|---|
| Itlooks like that PostgreSQL is for VEEAM Backup and that the DB I need in actually on the Linux box... |
| Posted by: sirclesadmin - 16 December 2025 13:07:45 |
|---|
|
Since you don't have a login for the Linux server itself, you need to gain physical (or virtual console) access to reset the root password first. This is a standard system administration task known as "booting into single-user mode." Here is the step-by-step "break-in" procedure to get root access, then pivot to the database to reset your uzERP admin password. Phase 1: The Linux "Break-In" (Reset Root Password)You need to be at the physical keyboard or have the VM console window open (e.g., vSphere, Hyper-V, Proxmox). SSH will not work for this.
Phase 2: Pivot to the DatabaseNow that you can log in to the Linux OS as
Phase 3: Reset uzERP AdminNow you are back in the SQL interface.
Phase 4: VerificationGo to
Next Step: If you get stuck on the "Break-In" phase (Step 4), tell me what text you see on the screen-some servers use LVM or encrypted disks which require one extra step to mount the drive. |
| Posted by: sirclesadmin - 16 December 2025 14:22:28 |
|---|
|
You are nearly there! The error
This tells us the correct column is The Correct CommandTry this command, which uses
If that gives an error about the "password" column:If it says
|
| Posted by: DogMan - 16 December 2025 14:22:56 |
|---|
| OK - I'm in and I will change the password to something more complex! |