1

Topic: Message of failed authentication on postgres after a fresh install

==== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Linux/BSD distribution name and version: Ubuntu 14.04
- Related log if you're reporting an issue:  11 times: [2014-08-28 13:50:55 +/-2 seconds]  password authentication failed for user "postgres"
====
Hi, I have a fresh install of iRedMail and I received three times this message on Logwatch:
--------------------- PostgreSQL Begin ------------------------

Fatals:
-------

11 times:
[2014-08-28 13:50:55 +/-2 seconds]  password authentication failed for user "postgres"


---------------------- PostgreSQL End -------------------------

When I check the postgresql-9.3-main.log I see this type of messages:
2014-08-31 22:50:49 EDT FATAL:  password authentication failed for user "postgres"
2014-08-31 22:50:49 EDT DETAIL:  Connection matched pg_hba.conf line 85: "local   all             postgres                                md5"

I haven't any problem to login in Roundcube or in administrator panel, so I don't have idea about which generate this authentication errors.

----

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

2

Re: Message of failed authentication on postgres after a fresh install

Does your daily backup script work if you execute it manually?

# bash /var/vmail/backup/backup_mysql.sh

Do you have any other scripts trying to login to PostgreSQL?

3

Re: Message of failed authentication on postgres after a fresh install

Hi Zhang,

I'm using postgres, so, in my case the script is backup_pgsql.sh. But seems it works fine:

root@mail:~# /var/vmail/backup/backup_pgsql.sh
bzip2: Output file vmail-2014.09.04.11.39.03.sql.bz2 already exists.
bzip2: Output file roundcubemail-2014.09.04.11.39.03.sql.bz2 already exists.
bzip2: Output file iredadmin-2014.09.04.11.39.03.sql.bz2 already exists.

[OK] Backup successfully completed.

* Backup log: /var/vmail/backup/pgsql/2014/09/04/2014.09.04.11.39.03.log:
* Starting at: 2014-09-04-11.39.03.
* Backup directory: /var/vmail/backup/pgsql/2014/09/04.
* Backing up databases ...
  + roundcubemail [DONE]
  + iredadmin [DONE]
  + vmail [DONE]
  + vmail [DONE]
  + cluebringer [DONE]
  + amavisd [DONE]
  + roundcubemail [DONE]
  + iredadmin [DONE]
* File size:
----
8.0K    /var/vmail/backup/pgsql/2014/09/04/amavisd-2014.09.04.11.39.03.sql.bz2
8.0K    /var/vmail/backup/pgsql/2014/09/04/cluebringer-2014.09.04.11.39.03.sql.bz2
12K     /var/vmail/backup/pgsql/2014/09/04/iredadmin-2014.09.04.11.39.03.sql
4.0K    /var/vmail/backup/pgsql/2014/09/04/iredadmin-2014.09.04.11.39.03.sql.bz2
52K     /var/vmail/backup/pgsql/2014/09/04/roundcubemail-2014.09.04.11.39.03.sql
12K     /var/vmail/backup/pgsql/2014/09/04/roundcubemail-2014.09.04.11.39.03.sql.bz2
40K     /var/vmail/backup/pgsql/2014/09/04/vmail-2014.09.04.11.39.03.sql
8.0K    /var/vmail/backup/pgsql/2014/09/04/vmail-2014.09.04.11.39.03.sql.bz2
----
* Backup completed (Success? YES).
root@mail:~#

The last error of this type is since two days:

root@mail:/var/log# tail postgresql/postgresql-9.3-main.log
2014-09-02 12:37:42 EDT DETAIL:  Connection matched pg_hba.conf line 85: "local   all             postgres                                md5"
2014-09-02 12:37:43 EDT FATAL:  password authentication failed for user "postgres"
2014-09-02 12:37:43 EDT DETAIL:  Connection matched pg_hba.conf line 85: "local   all             postgres                                md5"
2014-09-02 12:37:43 EDT FATAL:  password authentication failed for user "postgres"
2014-09-02 12:37:43 EDT DETAIL:  Connection matched pg_hba.conf line 85: "local   all             postgres                                md5"
2014-09-02 12:37:44 EDT FATAL:  password authentication failed for user "postgres"
2014-09-02 12:37:44 EDT DETAIL:  Connection matched pg_hba.conf line 85: "local   all             postgres                                md5"
2014-09-02 12:37:44 EDT FATAL:  password authentication failed for user "postgres"
2014-09-02 12:37:44 EDT DETAIL:  Connection matched pg_hba.conf line 85: "local   all             postgres                                md5"
2014-09-02 12:37:44 EDT LOG:  incomplete startup packet
root@mail:/var/log#

And about other scripts, I haven't. It's just a fresh iRedMail installation in this server.

4

Re: Message of failed authentication on postgres after a fresh install

I have no idea yet. Do you know any other user or applications trying to access PostgreSQL?

5

Re: Message of failed authentication on postgres after a fresh install

ZhangHuangbin wrote:

I have no idea yet. Do you know any other user or applications trying to access PostgreSQL?

No I don't.
It seems like a local try of connection, right?

6

Re: Message of failed authentication on postgres after a fresh install

Adrian Rocha wrote:

It seems like a local try of connection, right?

Yes, PostgreSQL connection started on localhost.

You should check all users' ~/.history file to see whether or not they tried to connect to PostgreSQL, and check system log files under /var/log/ too.