šŸ” User/system email account passwords in database? [Where to find them]

Hello!
I wonder if anyone of you guys know where the passwords are stored in the database for system e-mail accounts and for users.

SuiteCRM is trolling a bit and wonā€™t let me save the password for the outgoing main (shared) e-mail account.

I know that sometimes it just better and easier to just edit the database instead to fix the issue and get over with it.

So i would appreciate the help with guiding me to the right database pathsā€¦ :+1:

Thanks in advance! :smiley:
Kind regards

Tables inbound_email and outbound_email.

Iā€™ve done that thing of configuring accounts from the database myself, the buggy UI is just too much hassle.

If you need to peek inside the field stored_options, just paste that content in this site: https://www.base64decode.org/

Yes it refused to save my darn passwords. I have just been so annoyed that I havenā€™t been bothered with fixing the mail shared account for months. (Which is sort of why i posted about it here now because i need to get it sorted)

Hmm ok odd. I cannot find " stored_options" in my database.
Thoughts?

Thanksā€¦

Itā€™s a field, as I said. Youā€™ll find it in inbound_email table.

1 Like

Ok, thanks. Iā€™ll check it out in a bit from now. I missed reading the ā€œfieldā€ partā€¦
Whoops. :blush:

1 Like

Hi @pgr

Ok, been s bit busy so I had first now some time to look into it.
I found the table. Is it ā€œsafeā€ to just change for example the passwords directly e.g. copy paste ā†’ Save. Or are they hashed or serialized so you need to use some tool to do it?

Also can you add a new e-mail user directly in the Db or do you have to use the SuiteCRM UI and then edit the DB to that that? (Iā€™m guessing the latter, but I have to ask).

Thanks a bunch! :smiley:
Kind regards

Hi.
Did you see my last question? I checked myself of course and I can see that the passwords are not stored ā€œas isā€. So they are hashed or something right?

Is that what you use the https://www.base64decode.org for to convert the data in the DB to the original?

How do you then edit the DB and change a password directly?

Thanks!

Kind regards

The Base64 encoding is just a compact way of storing JSON in the database, itā€™s not a security thing. Itā€™s how you encode and decode the stored_options

The passwords are different, theyā€™re arenā€™t actually stored in the DB, only an MD5 hash of them. Then when the user types the password, itā€™s rehashed and compared to the stored hash.

This how you can set user passwords from database:

// MySQL only, not MSSQL
update users set user_hash = md5('jimsPass') where user_name = 'jim';  

Normally I donā€™t do this, what Iā€™ve done before is start from an already configured user, one I know that works, and copy the hash into a separate row in the database.

The same goes for email accounts, I always start them from the UI, not the DB, but Iā€™ve sometimes copied hashed passwords from an installation where I know the account is ok into another one that Iā€™m having trouble configuring due to UI bugs.

1 Like

Thank you so much for explaining this.
So the MySQL DB query

Is for changing the password of a user right?

So how does the one run a DB query for changing an email accountā€™s password?
Is it possible you could be kind and share an DB query where you change the email password instead, please?

I have exactly the issue that SuiteCRM doesnā€™t want/refuses to save the shared e-mail account and also changes in the personal emails setup when you do it from the UI.

It does indeed seem to be quite buggy as you also made a mention about beforeā€¦

Thanks again! :blush:

Sorry I canā€™t do the SQL for you right now, but itā€™s a matter of going to the correct table, which will either be inbound_email or outbound_email and doing an UPDATE query to set the password field in a similar way as the query above (using the MD5 function).

1 Like

Thanks, I appreciate your kind help and I understand.

In my case it is both inbound_email or outbound_email that is just not working at all the on the shared group e-mail account.

Kind regards