Re: Roles with empty password (probably bug in libpq and in psql as well).
От | Adrian Klaver |
---|---|
Тема | Re: Roles with empty password (probably bug in libpq and in psql as well). |
Дата | |
Msg-id | 500EB1DD.1010404@gmail.com обсуждение исходный текст |
Ответ на | Roles with empty password (probably bug in libpq and in psql as well). (Dmitriy Igrishin <dmitigr@gmail.com>) |
Список | 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.klaver@gmail.com
В списке pgsql-general по дате отправления: