Can't get pgsql 8.1.4 to password protect roles.
I'm trying to password protect both the superuser role and another role that
I created later with less privileges but I can't seem to get it to work. I
have tried using the command *ALTER USER user WITH PASSWORD 'password';* and
it responds with *ALTER ROLE* but it seems to have no effect at all. Even
after I've password protected the role I can login to it with the
*psql*command without a password. Even when I force it to prompt for
the password
with *-W*, I can type anything into the prompt and it still lets me in. I
have made no alterations to the configuration files, and to the extent of my
knowledge the compilation was standard other than *PREFIX*. Does anyone
know what I have done wrong here?
PS. Sorry if this is a really stupid question, I'm new to pgsql.
"Will Buik" <willbuik@gmail.com> writes:
I'm trying to password protect both the superuser role and another role that
I created later with less privileges but I can't seem to get it to work. I
have tried using the command *ALTER USER user WITH PASSWORD 'password';* and
it responds with *ALTER ROLE* but it seems to have no effect at all. Even
after I've password protected the role I can login to it with the
*psql*command without a password.
You need to change pg_hba.conf to select a password-based authentication
mode ("md5" is the one usually used). See
http://www.postgresql.org/docs/8.1/static/client-authentication.html
regards, tom lane