Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
$ brew install postgresql
$ initdb /usr/local/var/postgres -U kimball -W

Entered blank password when prompted. Also tried with no flags previously, but still get locked out.

$ cat /usr/local/var/postgres/pg_hba.conf | grep trust
# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi",
# CAUTION: Configuring the system for local "trust" authentication
# the database superuser.  If you do not trust all your local users,
local   all             all                                     trust
host    all             all             127.0.0.1/32            trust
host    all             all             ::1/128                 trust
$ psql -U kimball
Password for user kimball: 
psql: fe_sendauth: no password supplied

Can anyone please help?

share|improve this question
also tried a test password, no dice either. – kbighorse Jul 23 '11 at 20:02
I have two ideas: You have more than one database cluster, so you should use psql -p portNumber to select right server or you have some entries in pg_hba.conf before trust method entries (because of pg_hba.conf | grep trust). Note that DB server restart or just reload is required after any changes maded on pg_hba.conf. – Grzegorz Szpetkowski Jul 24 '11 at 12:11

migrated from stackoverflow.com Jul 24 '11 at 16:02

2 Answers

Use this:

$ psql -U kimball -h localhost

Also, do keep in mind that trust policy for all users connecting from all hosts is not a good idea.

share|improve this answer

It might be that your kimball user doesn't have the login privilege. Try:

$ psql -U postgres

From in there:

alter user kimball superuser login;

And then, back in the shell:

$ psql -U kimball
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.