reset password
Author Message
ummata
Posts: 68
Posted 20:34 Nov 19, 2012 |

I just noticed that when I have a problem using psql.
When run "psql -U cs520 cs520", cs520 is my username and database name. I will get this error.
psql: FATAL:  Peer authentication failed for user "cs520"

However I can use pgAdmin, but I just curios about this. It might be a configuration problem.
I did search for a solution from cs520 forum. I don't see anyone mention this before.

cysun
Posts: 2935
Posted 21:09 Nov 19, 2012 |

Peer authentication use the username of your account as the username of the database user. Since you are not logged in as user cs520, peer authentication will fail.

pgAdmin probably uses password/md5 authentication.

You can try the -W option with psql to enter the password.