Re: Roles with empty password (probably bug in libpq and in psql as well).

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Roles with empty password (probably bug in libpq and in psql as well).
Date: 2012-07-24 14:31:57
Message-ID: 500EB1DD.1010404@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07/24/2012 05:41 AM, Dmitriy Igrishin wrote:
> Hey all,
>
> According to http://www.postgresql.org/docs/9.2/static/sql-alterrole.html
>
> A query:
> ALTER ROLE davide WITH PASSWORD NULL;
> removes a role's password.

http://www.postgresql.org/docs/9.2/static/sql-createrole.html
PASSWORD password
Sets the role's password. (A password is only of use for roles having
the LOGIN attribute, but you can nonetheless define one for roles
without it.) If you do not plan to use password authentication you can
omit this option. If no password is specified, the password will be set
to null and password authentication will always fail for that user. A
null password can optionally be written explicitly as PASSWORD NULL.

>
> But it's impossible to pass empty (NULL) password to the backend
> by using libpq, because connectOptions2() defined the fe-connect.c
> reads a password from the ~/.pgpass even when a password
> specified as an empty string literal ("").
>
> Also, when connecting to the server via psql(1) by using a role
> with removed password psql exists with status 2 and prints the error
> message:
> psql: fe_sendauth: no password supplied

I do not see much traction in the argument no password == password. I do
see where a warning that you are losing the ability to login would be nice.

>
> Thanks.
>
> --
> // Dmitriy.
>
>

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-07-24 14:36:59 Re: Roles with empty password (probably bug in libpq and in psql as well).
Previous Message Scott Marlowe 2012-07-24 14:20:12 Re: Odd corruption issue reported on dba.stackexchange.com, need advice