Installing postgresql, problems with non-existant user...

Andrea Giuliano a.giuliano at iccu.sbn.it
Fri Jun 24 08:29:02 UTC 2005


Uncomment the line "local all all" in pg_hba.conf, so that any local 
postgres user can connect to any database. You still have to create at 
least one user, with the appropriate privileges. You should use "sudo -u 
postgres createuser", as Jay Camp already said.

The right pg_hba.conf depends on how you installed PostgreSQL, but if 
you did a default installation, it should be in /var/lib/postgres/data.

I noticed that the default installation doesn't start any network 
service on the default port 5432: actually only local connection, I 
guess via UNIX sockets, are thus allowed.

Best regards.

Neil Woolford wrote:
> Hi,
> 
> I've just installed the postgresql and postgresql-client packages using
> Synaptic.
> 
> When I try to create a database I get the following error;
> 
> createdb: could not connect to database template1: FATAL:  user "neil"
> does not exist
> 
> Similar errors occur if I try to create a user.  
> 
> If I explicitly try to run a command as user 'postgres' I get;
> 
> createdb: could not connect to database template1: FATAL:  IDENT
> authentication failed for user "postgres"
> 
> My reading of the manual so far is that the default setup should be that
> all local users are automatically allowed to create databases.
> 
> What should I be setting up?  What have I missed?
> 
> Neil
> 
> 

-- 
Andrea Giuliano, Ph. D.
ICCU - Istituto Centrale per il Catalogo Unico
Viale Castro Pretorio 105, Rome - ITALY
Tel. +39064989509, Fax +39064059302




More information about the ubuntu-users mailing list