# Odd issue with user login

**URL:** <https://forum.inductiveautomation.com/t/odd-issue-with-user-login/114234>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 27, 2026, 4:45pm UTC](https://forum.inductiveautomation.com/t/odd-issue-with-user-login/114234 "2026-02-27T16:45:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![NP209](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/np209/32/80704_2.png) [@NP209](https://forum.inductiveautomation.com/u/NP209)\
**Post date:** [February 27, 2026, 4:45pm UTC](https://forum.inductiveautomation.com/t/odd-issue-with-user-login/114234/1 "2026-02-27T16:45:24Z")

</div>

Okay so I have an odd problem with getting a user database working properly.

First I setup a user database

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/0/50bee0ba78245d1f3282ecb873bb63852540c901.png)

I have it set to Automatic

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/3/b3295ab3a40468cbd385626857e4a9d99f376817.png)

We setup a generic UI for managing the user DB.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/3/83effa134f5fd2400afe076ad9620bf0e8be5fb2.png)

Now here is the funny part, if we setup the password on the gateway it works

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/e/ded1ba8e63a71bf50afb03a413f7c2dbaf3414bb.png)

If we reset/generate a password from here, it will not work.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/1/b191e54d35dac11e28d32ba67c2e6451ab2519e5.png)

It’s my understanding that passwords are typically encoded in base64. So we have our reset/generate button setup to randomly generate a password encode it and write it to the table.

We have tested to make sure that what is in the table for the password comes back correct so its not an issue where we are writing the wrong password to the table and attempting to login with the wrong password.

Is there a step or anything that I’m missing? Does something else on the backend check something I’m missing? The only thing different between the two methods of changing the password that I can see is where its happening. The passwords being recorded appear to be exactly the same in the table.

This is the built in login screen in question

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/8/a80a0c60d1b0959e52c81444546815724c69c76a.png)

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [February 27, 2026, 4:52pm UTC](https://forum.inductiveautomation.com/t/odd-issue-with-user-login/114234/3 "2026-02-27T16:52:45Z")

</div>

> [@NP209](#):
>
> typically encoded in base64

They are also typically hashed and salted.  
Maybe share how you’re generating the passwords?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 27, 2026, 4:55pm UTC](https://forum.inductiveautomation.com/t/odd-issue-with-user-login/114234/4 "2026-02-27T16:55:44Z")

</div>

The database user source uses SHA1 hashing but no salt by default, for legacy/backwards compatibility reasons as far as I remember.

See this example that does exactly what you're trying to do (though is built in a Vision context, so will require some minor adjustments):

> **[Password Encryption​ - Database Authentication | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.3/platform/security/classic-authentication-strategy/database-authentication#password-encryption)**
>
> The Database Authentication type uses an external database instead of storing data inside Ignition. Managing users is done via direct interaction with the database. This section addresses how to set up a database user source. The Database...

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [February 27, 2026, 5:04pm UTC](https://forum.inductiveautomation.com/t/odd-issue-with-user-login/114234/5 "2026-02-27T17:04:36Z")

</div>

Just good rule of thumb if you’re using Ignition’s built in solution then to interact with it’s definitely preferable to use their API for it. Simple as

```python
user = system.user.getUser("someUserSource", "someUserName")
user.set("Password", "newPassword")
result = system.user.editUser("someUserSource", user)
if result.errors:
    # handle here

```

---

<div class="post-metadata">

**Author:** ![NP209](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/np209/32/80704_2.png) [@NP209](https://forum.inductiveautomation.com/u/NP209)\
**Post date:** [February 27, 2026, 5:07pm UTC](https://forum.inductiveautomation.com/t/odd-issue-with-user-login/114234/6 "2026-02-27T17:07:39Z")

</div>

I switched it over to use this method like in the example, just modified to work in our library.

`def EmailPasswordReset(ID, Email, dbName="NamesDB"):`  
` newPass = "JGF321"`  
` from com.inductiveautomation.ignition.common.util import SecurityUtils`  
` encryptPass = SecurityUtils.sha1String(newPass)`  
` query = "UPDATE JGF_users SET passwd = ? WHERE id = ?"`  
` args = [encodedPassword, ID]`  
` system.db.runPrepUpdate(query, args, dbName)`

The password comes out like this in the table

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/7/d76c582608f659a594291add26d3094d1b8fc978.png)

When we try to login with JGF321 under Test

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/c/8c7edfd7282c6746bdbfb8418d9fdd5968453330.png)

---

<div class="post-metadata">

**Author:** ![NP209](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/np209/32/80704_2.png) [@NP209](https://forum.inductiveautomation.com/u/NP209)\
**Post date:** [February 27, 2026, 5:09pm UTC](https://forum.inductiveautomation.com/t/odd-issue-with-user-login/114234/7 "2026-02-27T17:09:07Z")

</div>

I didn’t know about this, I will look into it. Might be better than what we are doing now.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 27, 2026, 5:11pm UTC](https://forum.inductiveautomation.com/t/odd-issue-with-user-login/114234/8 "2026-02-27T17:11:46Z")

</div>

Are there any messages in the gateway logs from `UserSource.DB_AutomaticMode`? What if you set it to trace?

You might be locked out from successive failed attempts.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [February 27, 2026, 5:11pm UTC](https://forum.inductiveautomation.com/t/odd-issue-with-user-login/114234/9 "2026-02-27T17:11:52Z")

</div>

Your code is sending `encodedPassword` to the stored procedure instead of `encryptPass`. SHA1 hashes don't look like what your passwd column shows. Your column looks like base64 encoded data, not hashed data.

Edit: Although, maybe it's doing a base64 encode on it as well. I just tested your code and I get the following string for my encryptPass variable: `eO9d3kIvGVY/WZS0FPu4w4j0hjA=`

---

<div class="post-metadata">

**Author:** ![NP209](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/np209/32/80704_2.png) [@NP209](https://forum.inductiveautomation.com/u/NP209)\
**Post date:** [February 27, 2026, 5:15pm UTC](https://forum.inductiveautomation.com/t/odd-issue-with-user-login/114234/10 "2026-02-27T17:15:40Z")

</div>

Yeah so I got it working just now, I realized I didn’t update one of the params. Thanks everyone! Paul’s solution got us going. I appreciate everyone.
