From: Tom Lane <tgl@sss.pgh.pa.us>
To: La Cancellera Yoann <lacancellera.yoann@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Issues with PAM : log that it failed, whether it actually failed or not
Date: Fri, 11 Oct 2019 10:08:37 -0400
Message-ID: <15705.1570802917@sss.pgh.pa.us> (raw)
In-Reply-To: <CACP=ajbrFFYUrLyJBLV8=q+eNCapa1xDEyvXhMoYrNphs-xqPw@mail.gmail.com>
References: <CACP=ajbrFFYUrLyJBLV8=q+eNCapa1xDEyvXhMoYrNphs-xqPw@mail.gmail.com>
La Cancellera Yoann <lacancellera.yoann@gmail.com> writes:
> I am having issues with PAM auth :
> it works, password are correctly checked, unknown users cannot access,
> known user can, everything looks good
> But, it always log an error by default even if auth is succesful:
> And if auth is unsuccessful, it will log that very same message twice
Those aren't errors, they're just log events.
If you're using psql to connect, the extra messages aren't surprising,
because psql will first try to connect without a password, and only
if it gets a failure that indicates that a password is needed will
it prompt the user for a password (so two connection attempts occur,
even if the second one is successful). You can override that default
behavior with the -W switch, and I bet that will make the extra
log messages go away.
Having said that, using LOG level for unsurprising auth failures
seems excessively chatty. More-commonly-used auth methods aren't
that noisy.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, lacancellera.yoann@gmail.com
Subject: Re: Issues with PAM : log that it failed, whether it actually failed or not
In-Reply-To: <15705.1570802917@sss.pgh.pa.us>
References: <CACP=ajbrFFYUrLyJBLV8=q+eNCapa1xDEyvXhMoYrNphs-xqPw@mail.gmail.com> <15705.1570802917@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox