Also, see pg_hba.conf in the postgres documentation.  There can be
rules as to who can connect at all, let alone who needs a password.


On 2/17/12, Sebastian Goll <sebastian.g...@gmx.de> wrote:
> On Thu, 16 Feb 2012 22:18:03 -0800 (PST)
> Gchorn <guillaumech...@gmail.com> wrote:
>
>> Unfortunately, that doesn't seem to be the case.  I have the database
>> user and password in my settings.py file, but I still have to do a
>> "sudo su postgres" to switch to postgres in the terminal before I can
>> access my PostgreSQL database through the Django database API.
>> Otherwise when I try to access it through my normal username
>> "guillaume", I get: (…)
>
> I think this is due to the following. Fair warning: I'm no expert on
> PostgreSQL authentication details, so take this info with a grain of
> salt.
>
> When HOST in DATABASES is blank, Postgres does local authentication,
> ident-based, IIRC, ie. it connects to the database with your current
> Unix user name. Try changing HOST to '127.0.0.1'. Alternatively, you
> can leave HOST as is (blank), and create your own Postgres user with
> /usr/bin/createuser; same name as your Unix user.
>
> Best wishes,
> Sebastian.
>
> --
> 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.
>
>

-- 
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