Re: createdb: could not connect to database postgres: FATAL: Ident authentication failed for user "root" error

From: Lennin Caro <lennin(dot)caro(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, bijoy <bijoy(dot)franco(at)gmail(dot)com>
Subject: Re: createdb: could not connect to database postgres: FATAL: Ident authentication failed for user "root" error
Date: 2009-03-30 16:39:55
Message-ID: 286459.76518.qm@web59507.mail.ac4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


> From: bijoy <bijoy(dot)franco(at)gmail(dot)com>
> Subject: Re: [NOVICE] createdb: could not connect to database postgres: FATAL: Ident authentication failed for user "root" error
> To: pgsql-novice(at)postgresql(dot)org, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> Date: Monday, March 30, 2009, 3:57 PM
> Hi,
>
> How to find out superuser 'postgres' password. How
> to change the password
>
> Thanks in advance
>
> Bijoy
>
>
> On Sat, Mar 28, 2009 at 10:45 PM, Tom Lane
> <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> > bijoy <bijoy(dot)franco(at)gmail(dot)com> writes:
> > > when i tried creating database using
> 'createdb', following error
> > occuered.
> > > createdb mydb
> > > createdb: could not connect to database postgres:
> FATAL: Ident
> > > authentication failed for user "root"
> >
> > You didn't say whose packaging of Postgres this
> is, but it looks like
> > you're using a setup that has ident authentication
> selected. That
> > means the only user that can get in initially is user
> "postgres".
> > (Well, actually, whatever the initial superuser is,
> but the odds are
> > just about 100% that it's named
> "postgres".) Your first step should
> > probably be to create a postgres account for your
> regular userid
> > (not root), say via
> >
> > su - postgres
> > createuser joe
> >
> > If you don't want authentication to work this way,
> you can change the
> > setup in pg_hba.conf. See the manual under
> "Client Authentication".
> > If you're the only person using the machine and
> you're unworried about
> > someone cracking into it, you could just as well use
> "trust" mode
> > and not bother with restrictions.
> >
> > regards, tom lane
> >

the postgres user exist in your OS?
with root account try

#su - postgres

then use the command creatdb

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message bijoy 2009-03-30 16:48:43 Re: createdb: could not connect to database postgres: FATAL: Ident authentication failed for user "root" error
Previous Message bijoy 2009-03-30 15:57:31 Re: createdb: could not connect to database postgres: FATAL: Ident authentication failed for user "root" error