1

Topic: iRedAdmin-Pro-MySQL-1.9.2 global admin issue

==== Required information ====
- iRedMail version:  iRedMail-0.9.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): iRedAdmin-Pro-MySQL-1.9.2
- Linux/BSD distribution name and version: Ubuntu 14.04
- Related log if you're reporting an issue:
====

Hi Zhuan.

I've done a complete new reinstall. I backupped the mysql tables and i reimported them.
Then in upgraded iredadmin to pro and i got presented the question of selfservice. Now I choose yes. As i was curious.
When i logged in with my global admin account, i saw only for that mail account like a regular account.

So i chose the option False in the settings.py (SelfService)
Now i cant login at all.

Is there any option to set it to default? Or can you help me generate a Global admin account through the mysql directly?

Thanks in advance.

----

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

2

Re: iRedAdmin-Pro-MySQL-1.9.2 global admin issue

Set 'isglobaladmin=1' for this admin in sql table 'vmail.mailbox'. For example:

sql> use vmail;
sql> update mailbox set isglobaladmin=1 where username='your_admin@domain.com';

3

Re: iRedAdmin-Pro-MySQL-1.9.2 global admin issue

Update:
If i set the selfservice in the settings.py to false, i can't login to my iredadmin.
If i set it back to true, i can log on again, but with your update to the SQL Dbase, i still don't seem to be a global admin. I can only apply things to my own mail address.

Any ideas?

4

Re: iRedAdmin-Pro-MySQL-1.9.2 global admin issue

Try one more SQL command:

mysql> USE vmail;
mysql> INSERT INTO domain_admins (username,domain,created) VALUES ("your_email_address","ALL", NOW());

By the way, upgrading iRedAdmin-Pro doesn't impact "vmail" database, i'm not sure why this issue occurs on your server. Did you delete some SQL records during upgrading iRedMail or iRedAdmin-Pro?

5

Re: iRedAdmin-Pro-MySQL-1.9.2 global admin issue

Jochie wrote:

I've done a complete new reinstall. I backupped the mysql tables and i reimported them.

Now i see why it happened.

We have some changes of SQL structure in recent iRedMail releases, looks like you didn't apply SQL structure related changes on old server BEFORE backup SQL database.

6

Re: iRedAdmin-Pro-MySQL-1.9.2 global admin issue

ERROR 1062 (23000): Duplicate entry 'user@domain-ALL' for key 'PRIMARY'

I think i went until 1.8.6 if im not mistaking.

I might have missed a table maybe, but this one seems to be there.
Again, Thanks Zhang for your good service!

7

Re: iRedAdmin-Pro-MySQL-1.9.2 global admin issue

Well, it doesn't make sense here. With the latest iRedAdmin-Pro release, global admin should be able to login (as global admin, not as normal user for self-service) with mailbox.isglobaladmin=1 and domain_admins.domain=ALL.

Please try set mailbox.isadmin=1 for this user too. Let's see whether or not it works.
If it doesn't work, i'm afraid I need remote login for further debug.

8

Re: iRedAdmin-Pro-MySQL-1.9.2 global admin issue

I checked it and the account was globaladmin, but it didnt show.
However i upgraded another account to global admin. I deactivated the global admin and all admin privileges from that account.
flushed the dbase, reissued global admin and it's working.

Thanks for your patience.