Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've installed PostgreSQL 9 on Mac OS. I need to change the configuration so that I can access Postgre with the blank password. Searching online yields lots of solutions for older versions of the software, butt I don't know if they apply to the newer version. Many solutions discuss a .conf file of sorts, but the only config files are .conf.sample in the Postgre directories.

My root user now has a blank password. Having this blank password seems to result in an error when I try to connect or set a new password.

I recieve this when trying to connect with the empty password:

psql: fe_sendauth: no password supplied

How can I change the password and/or enable the conf files?

share|improve this question
enabling the config file should be as simple as removing the .sample extension and restarting the postgres server. – Fosco Jul 7 '11 at 13:34

Your PostgreSQL administrator account is most likely postgres. You can log in as postgresql administrator by first becoming postgres mac user sudo -i -u postgres. Then you can access PostgreSQL prompt with psql.

To change administrator password: ALTER USER postgres PASSWORD 'somepassword';.

To allow logging in without password, you need to edit pg_hba.conf, which probably resides in/Library/PostgreSQL/9.0/data/pg_hba.conf.

I use ident authentication to allow mac user jkj to log in as PostgreSQL user jkj without password.

local   all       jkj                 ident

Remember that you first have to create your username in PostgreSQL. It can be a superuser.

createuser -s jkj
share|improve this answer
When trying to run psql, I am prompted for a password. The blank password returns psql: fe_sendauth: no password supplied. – Moshe Jul 7 '11 at 13:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .