1

Topic: Wrong password saved on installation

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9 MARIADB edition
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Debian GNU/Linux 9 (stretch)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MARIADB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

So after getting very close to just deleting everything and quitting trying to get iRedMail up and running over the past 3 days because no matter what I did I could not login to roundcube, I was getting the horrible "Login Failed!" message at the login screen. So reading pointless error messages and reading log... after log... after log... after log all being no help becasue all they were saying was "Authentication failed..." like obviously dude - when I get Login failed message that usually would mean that it hasnt authenticated.. but why aren't you telling me why???

Any way, so I logged into my mariadb server and checked the postmaster user details in the vmail schema. I looked at the password and saw it it hashed with SSHA512 so I knew I could use "doveadm" tool to check my password and that iredmail was maybe using the same hashing algo, and low and behold when I hashed my password the resulting hash was different!! so I replaced the hash in the database with the hash of my password, tried to log in and hey presto! It worked!!

So why is the password from installation different to the one I stated on installation?? I mean it's as if iredmail just created its own random password and told me (in iredmail.tips) that my password was the one I set - but that was a lie! How can this happen?

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Wrong password saved on installation

Did you have any special characters in the password? like % # $, etc.

3

Re: Wrong password saved on installation

Thanks for the quick reply..

ZhangHuangbin wrote:

Did you have any special characters in the password? like % # $, etc.

No, it was a fairly simple 6 letters and 4 digits.

4 (edited by jamieoglindsey0 2019-02-14 19:21:58)

Re: Wrong password saved on installation

I have not been able to send or receive emails. After checking the mail.log I saw "mail amavis[22855]: (22855-01) (!)connect_to_sql: unable to connect to DSN 'DBI:mysql:database=amavisd;host=127.0.0.1;port=3306': Access denied for user 'amavisd'@'localhost' (using password: YES)" which I know to often mean that the password is wrong, so I changed the amavisd user password in the database to the one in the file "config" that is generated on installation and again it now does not give this error! So it seems all the password are wrong. I have reinstalled iRedMail at least 5 times and cleaned up after each one that didnt work. How is it even possible for the installation to be creating passwords and then not using that set password for the installation?

EDIT So this has happened with the whole installation! Vey frustrating, I am now having to find all the passwords and change them in the database/

5

Re: Wrong password saved on installation

ZhangHuangbin wrote:

Did you have any special characters in the password? like % # $, etc.

Sorry if this is off topic, but I'm having the same issue and I do have special characters in the password.  I cannot receive or send any mail, and my password does contain a special character.  How would I go about fixing this?

Roundcube says "Server Error: SELECT: Internal error occurred.  Refer to server log for more information."

6

Re: Wrong password saved on installation

vinnysaj wrote:
ZhangHuangbin wrote:

Did you have any special characters in the password? like % # $, etc.

Sorry if this is off topic, but I'm having the same issue and I do have special characters in the password.  I cannot receive or send any mail, and my password does contain a special character.  How would I go about fixing this?

Roundcube says "Server Error: SELECT: Internal error occurred.  Refer to server log for more information."

I actually ended up reinstalling iredmail even after I fixed this issue. I can help guide you through what I did in order to fix the problem. Which was not related to my postmaster account password but the passwords of the database users relating to iredadmin and vmail etc.

You will access to the database and possibly sudo user access.

First you will need to find the settings.py file located in the iredadmin directory, I have chosen custom install locations but I think this will be in /opt/iredadmin. Open this file and you will see various passwords. You need to copy one at a time and use the database password hash function, for me it MariaDB so using either command line access or anything you can use to execute sql queries such as phpmyadmin or adminer etc. Then you can use this to return the hash of each password within settings.py, SELECT PASSWORD ('<the_copied_password'); this will return a password hash such as *HDBRJKDKDBXHJDNDNDHDJMDNDKDK. Then in your database access the users and check the password hash of each user and if needed just copy and paste the new hashed password. It may be the case you don't need to hash the passwords first.

You could also just add a new user directly into the database by replicating the postmaster account and use a different email. Which should work but I didn't do this so I cannot say for sure.

7

Re: Wrong password saved on installation

jamieoglindsey0 wrote:

I have reinstalled iRedMail at least 5 times and cleaned up after each one that didnt work. How is it even possible for the installation to be creating passwords and then not using that set password for the installation?

I didn't have this issue myself, and no others reported similar issue before (as i can remember).

Questions:

- Did you have MariaDB running on the server BEFORE installing iRedMail?
- Did you modify any files right after finished iRedMail installation wizard - the dialog pages? especially the "config" file under iRedMail directory.