On Mon, Oct 17, 2011 at 11:00 AM, Nico <nicodenb...@yahoo.com> wrote:
> Hi, I am new to Django AND PostgreSQL. I want to setup a PostgreSQL
> backend.
>
> I have created a database
>    createdb myproject
> Then, as superuser in psql:
>    CREATE USER george WITH PASSWORD 'password';
>    GRANT ALL PRIVILEGES ON DATABASE money TO george;
> Then I added this info in settings.py
>
> But, Django gives me an exception:
>   Ident authentication failed for user "george"
>
> So I tried the command line:
>   psql myproject george -W
> This prompted my for the password of george and then returned an
> error:
>   psql: FATAL:  Ident authentication failed for user "george"
>
> For now I have entered my superuser name in settings.py, so I could
> syncdb. The application works. But, of course I need to get this
> working with the user 'george' (fake name for this example) too, so I
> can use that in production environment.
>
> What am I doing wrong?

You need to set your pg_hba.conf settings to allow the user to connect.

The default config on Debian/Ubuntu is to allow you to connect to
Postgres as the same username as the OS user.

This can be modified to allow whatever authentication rule you wish,
per the manual.
http://developer.postgresql.org/pgdocs/postgres/client-authentication.html
or other docs depending upon your db version.

-- 
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to