1

Topic: adminer root login error and solution

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: Ubuntu 16.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? yes
====

Ubuntu 16.04 includes a new MariaDB that supports plugin authentication. By default, the sql root account is set to "unix_socket" which apparently prevents using Adminer to access the sql root since Adminer is (naturally) running non-privileged.

select user,plugin from mysql.user;
+------------+-------------+
| user       | plugin      |
+------------+-------------+
| root       | unix_socket |


Fix is to remove the unix_socket option:

  update mysql.user set plugin = '' where user = 'root';
  flush privileges;

After this I can log into Adminer as the sql root.


A better solution is probably to create a new db user, grant him full privs on amavis/ired*/sogo/vmail databases, then use that in Adminer instead of sql root.

----

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

2

Re: adminer root login error and solution

deltatango wrote:

A better solution is probably to create a new db user, grant him full privs on amavis/ired*/sogo/vmail databases, then use that in Adminer instead of sql root.

Adminer is not an optional component in iRedMail, so we tend to be as secure as possible.

3

Re: adminer root login error and solution

I am using your new adminer.tmpl template (commit # bf35c5a), so I assumed you might want to know about the glitch. Sorry for the bother.

4

Re: adminer root login error and solution

We added adminer.tmpl to help people setup Nginx+Adminer quickly, but not enable it by default. but i agree with you, we should at least mention this required change.

I added some comment lines about this required sql change in template file:
https://bitbucket.org/zhb/iredmail/comm … fc7f7cc541

Thank you very much for sharing and feedback. smile

BTW, the column name (user.user -> user.User) is incorrect in this commit, i will fix it later.