Problems changing password through JDBC

Поиск
Список
Период
Сортировка
От afgag@metroweb.co.za
Тема Problems changing password through JDBC
Дата
Msg-id 1079.130.88.16.231.1162201864.squirrel@airmail.metroweb.co.za
обсуждение исходный текст
Список pgsql-jdbc
Hi

I'm busy developing a client to communicate to a PostgreSQL 8.1 server
running on a Windows XP machine.  I have written the client in Java using
the PostgreSQL JDBC 3 drivers.

Part of the client's functionality is to allow the user to change his or
her PostgreSQL login password, but here I have run into some strange
behaviour.

At the moment, the PostgreSQL server is accepting only logins which
provide the password in plain text: no encryption is used at all.  When I
log into the server using a client such as psql and issue the SQL command
ALTER ROLE bob WITH PASSWORD 'bobette' (for example), all is fine and at
the next login (either from psql or my client) the user bob has to give
the password bobette.

However, when I issue the same command from within my client and send it
using JDBC, I don't get any errors but all subsequent login attempts (both
on psql and my client) by bob fail no matter what password is given:
PostgreSQL tells me the password is wrong.  It is almost as if the
password in the pg_authid table gets corrupted.

To test whether this was in fact happening, I changed the SQL in my client
to ALTER ROLE bob WITH UNENCRYPTED PASSWORD 'bobette' and then monitored
the password field in pg_authid from pgAdmin.  The password was correctly
changed, but again all login attempts both via psql and the client failed
with an incorrect password message.

I've done some digging, but so far I have found no posts about this kind
of problem.  Also don't really know which mailing list to send it to.

If anyone has any ideas I sure would appreciate it!

Thanks

Jacques









В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Michael Paesold
Дата:
Сообщение: Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails
Следующее
От: David Goodenough
Дата:
Сообщение: confused about transactions and connection pools