1

Topic: iredadmin login redirects to LOGIN_REQUIRED with message Error: Login

version 1.4.0 OPENLDAP edition.
Deployed with installer a couple of versions ago
Ubuntu 20.04.2 LTS
LDAP
nginx
not pro

I've searched these forums and have seen this posted before but haven't seen a solution. I've tried this with a couple of different browsers, tried cleaning cookies, tried icognito mode, etc.

When I try to log into iredadmin the login is successful according to the syslog but then the browser is redirected with a 303. I don't see any other log messages. Is there somewhere else where iredadmin logs info?

Is it strange in the log success message that admin is set but username is not set? Or that there are two login success messages and two redirect messages?

Rob

Jun 22 08:49:34 nuc iredadmin Admin login success: username=xxxxxx@xxxxxx.com, client_address=192.168.1.20 (/opt/www/iRedAdmin-1.3/controllers/ldap/basic.py, L95)
Jun 22 08:49:34 nuc iredadmin Admin login success admin=xxxxxx@xxxxxx.com, domain=, username=, event=login, ip=192.168.1.20 (/opt/www/iRedAdmin-1.3/libs/logger.py, L72)

Jun 22 08:49:34 nuc iredadmin: [192.168.1.20] POST /iredadmin/login 303 270 "https://192.168.1.5/iredadmin/login?msg=LOGIN_REQUIRED"
Jun 22 08:49:34 nuc iredadmin: [192.168.1.20] GET /iredadmin/login?msg=LOGIN_REQUIRED 200 5593 "https://192.168.1.5/iredadmin/login?msg=LOGIN_REQUIRED"

----

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

2

Re: iredadmin login redirects to LOGIN_REQUIRED with message Error: Login

i got the same issue sad

3

Re: iredadmin login redirects to LOGIN_REQUIRED with message Error: Login

I added some simple logging and I think it's having a problem here:
            qr_user_profile = ldap_lib_user.get_profile(mail=username, attributes=_attrs, conn=conn)

(a bit after line 95 - my line numbers are different now because of my log messages)

I'll try debugging it some more.

4

Re: iredadmin login redirects to LOGIN_REQUIRED with message Error: Login

I'm not very familiar with python, but here's some exception info. I'll see if I can get better info.


Jun 26 12:46:17 nuc iredadmin Unexpected error: (/opt/www/iRedAdmin-1.3/controllers/ldap/basic.py, L104)#012Traceback (most recent call last):#012  File "/opt/www/iRedAdmin-1.3/controllers/ldap/basic.py", line 102, in POST#012    qr_user_profile = ldap_lib_user.get_profile(mail=username, attributes=_attrs, conn=conn)#012  File "/opt/www/iRedAdmin-1.3/controllers/decorators.py", line 28, in proxyfunc#012    raise web.seeother("/login?msg=LOGIN_REQUIRED")#012web.webapi.SeeOther: 303 See Other

5

Re: iredadmin login redirects to LOGIN_REQUIRED with message Error: Login

A few versions of iredmail ago I followed the instructions to make a global admin, but I'm wondering if they're different now.
https://docs.iredmail.org/promote.user. … admin.html

I now have to entries in ldap for my email - one under o=domainAdmins and another under a domain. I'll try fixing up the ldap entries and see what happens.

6

Re: iredadmin login redirects to LOGIN_REQUIRED with message Error: Login

I finally got around to working on this again.

I promoted my user under my domain to be a global admin and I deleted the top-level globalAdmins node that contained a user with my same email address.

I'm now able to log in to iRedAdmin.