1

Topic: Unable to login to iredadmin or roundcube after fresh installation

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6
- Linux/BSD distribution name and version: FreeBSD 11.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====
Hi,

I just finished installing iRedMail on a FreeBSD 11.0 VM. After manually installing a couple of ports everything compiled and was configured correctly. I rebooted and went to the roundcube to try to login to read the .tips file, but the login details for my postmaster account were invalid.

I then tried iredadmin and it also complained that the credentials were incorrect. I found the .tips file in the /root/iredmail/ directory and copied and pasted the username and password from there to avoid mistakes but still no success.

Any ideas? the only thing that comes to my mind is that the password that I used for the postmaster account during setup contains spaces. Would that cause any problems?

----

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

2

Re: Unable to login to iredadmin or roundcube after fresh installation

Any error on console during iRedMail installation? And file iRedMail-0.9.6/runtime/install.log?
Any error in Nginx log file?

3

Re: Unable to login to iredadmin or roundcube after fresh installation

There was the first time I attempted to install, but only about the two ports the script couldn't install - amavisd-new and arj. Once I installed them manually it went fine the second time.

No errors in install.log that I can see. I have attached it for you to have a look at.

The nginx error.log is empty and the access.log looks normal.

Post's attachments

install.log 21.84 kb, 1 downloads since 2017-03-07 

You don't have the permssions to download the attachments of this post.

4

Re: Unable to login to iredadmin or roundcube after fresh installation

No error in install.log file. Any error while you trying to access Roundcube and iRedAdmin?

Check their log files in this tutorial:
http://www.iredmail.org/docs/file.locations.html

5 (edited by giantkingsquid 2017-03-09 07:06:53)

Re: Unable to login to iredadmin or roundcube after fresh installation

No errors are displayed on either web app.

Log for Roundcube.

Mar  9 08:37:44 28spots roundcube: <elgbmu90> IMAP Error: Login failed for postmaster@xxxxx.org from 192.168.178.41. LOGIN: Authentication failed. in /usr/local/www/roundcube/program/lib/Roundcube/rcube_imap.php on line 193 (POST /mail/?_task=login&_action=login)

Log for iRedAdmin (which doesn't look too exciting)

192.168.178.24 [pid: 578|app: 0|req: 1/1] 192.168.178.41 () {52 vars in 827 bytes} [Thu Mar  9 08:47:27 2017] GET /iredadmin/ => generated 4880 bytes in 313 msecs (HTTP/1.1 200) 2 headers in 136 bytes (2 switches on core 0)
192.168.178.24 [pid: 578|app: 0|req: 2/2] 192.168.178.41 () {58 vars in 1053 bytes} [Thu Mar  9 08:47:41 2017] POST /iredadmin/login => generated 0 bytes in 394 msecs (HTTP/1.1 303) 3 headers in 217 bytes (2 switches on core 0)
192.168.178.24 [pid: 578|app: 0|req: 3/3] 192.168.178.41 () {54 vars in 985 bytes} [Thu Mar  9 08:47:42 2017] GET /iredadmin/login?msg=INVALID_CREDENTIALS => generated 5082 bytes in 180 msecs (HTTP/1.1 200) 2 headers in 136 bytes (2 switches on core 0)

What is the easiest way to check or reset the password in the database?

Also, just tested using SQLbuddy, and I cannot login to the database using either the root or vmailadmin users. The same SQLbuddy install is working to login to another database on the local network.

6 (edited by giantkingsquid 2017-03-09 07:18:55)

Re: Unable to login to iredadmin or roundcube after fresh installation

Does this look right? It appears that the admin table in the vmail DB is empty, is this normal?

MariaDB [vmail]> select * from admin;
Empty set (0.00 sec)

Though the domain_admins is populated:

MariaDB [vmail]> select * from domain_admins;
+-------------------------------+--------+---------------------+---------------------+---------------------+--------+
| username                      | domain | created             | modified            | expired             | active |
+-------------------------------+--------+---------------------+---------------------+---------------------+--------+
| postmaster@xxxxx.org | ALL    | 2017-03-07 12:24:13 | 1970-01-01 01:01:01 | 9999-12-31 00:00:00 |      1 |
+-------------------------------+--------+---------------------+---------------------+---------------------+--------+
1 row in set (0.01 sec)

7

Re: Unable to login to iredadmin or roundcube after fresh installation

So I am up and running to some extent.

I manually created a user in the vmail admin table so that I could login to iredadmin which worked successfully.

Once I logged in I went to the Admins page and I now have two postmasters@xxxxx.org, the one I created manually and the original one.

Now the one that I created manually cannot login to roundcube, but the original one can, after I changed it's password.
And vise versa, the orignal user can login into roundcube but cannot login to iRedAdmin.

Is there anyway to "merge" the two users? I suppose a dodgy way to do it would be to change them to both have the same password.

Post's attachments

Capture.PNG
Capture.PNG 16.52 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

8

Re: Unable to login to iredadmin or roundcube after fresh installation

giantkingsquid wrote:

Does this look right? It appears that the admin table in the vmail DB is empty, is this normal?

This is normal. First user created during iRedMail installation is a mail user with global admin privilege. but sql table "admin" is used to store standalone admin account which means it doesn't have a mailbox.

You should remove the one in "admin" table, and update the one in "mailbox" table, make sure sql column "isglobaladmin" is set to 1.

9

Re: Unable to login to iredadmin or roundcube after fresh installation

Same issue. Juts upgraded to Pro version.

I do can Login into iredadmin but not to roundcube session.

IMAP Error in /opt/www/roundcubemail-1.3.6/program/lib/Roundcube/rcube_imap.php (196): Login failed for user@domain.tld from xx.xx.xx.xx. LOGIN: Authentication failed.

I noticed that users table at roundcubemail database is empty.

Any ideas where to go from here?

10

Re: Unable to login to iredadmin or roundcube after fresh installation

Please turn on debug mode in Dovecot for troubleshooting Roundcube login.
FYI: https://docs.iredmail.org/debug.dovecot.html