pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
cannot connect using terminal nor pgaccess
8+ messages / 5 participants
[nested] [flat]

* cannot connect using terminal nor pgaccess
@ 2001-05-21 14:19  Jaume Teixi <teixi@6tems.com>
  0 siblings, 3 replies; 8+ messages in thread

From: Jaume Teixi @ 2001-05-21 14:19 UTC (permalink / raw)
  To: pgsql-admin

$ psql -d template1 -U postgres
psql: Peer authentication failed for user 'postgres'


$ psql -d template1 -U postgres -h localhost -p 5432
psql: IDENT authentication failed for user 'postgres'

$ grep -v ^# /etc/postgresql/pg_hba.conf | grep -i sameuser
local        all                                           peer sameuser
host         all         127.0.0.1     255.255.255.0       ident sameuser

$ su - postgres -- psql template1
Password: 
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

template1=# select postgres from pg_user;
   usename   | usesysid | usecreatedb | usetrace | usesuper | usecatupd | 
passwd  | valuntil 
-------------+----------+-------------+----------+----------+-----------+----------+----------
 postgres    |       31 | t           | t        | t        | t         |
******** | 


what I am missing in this case ?

thanks!

-- 
Jaume Teixi
    CTO 
    6TEMS - Ducform, SA
    http://www.6tems.com




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: cannot connect using terminal nor pgaccess
@ 2001-05-21 14:57  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Jaume Teixi <teixi@6tems.com>
  2 siblings, 0 replies; 8+ messages in thread

From: Tom Lane @ 2001-05-21 14:57 UTC (permalink / raw)
  To: Jaume Teixi <teixi@6tems.com>; +Cc: pgsql-admin

Jaume Teixi <teixi@6tems.com> writes:
> $ psql -d template1 -U postgres
> psql: Peer authentication failed for user 'postgres'

There is no such animal as "peer" authentication in Postgres.  Are you
using a locally hacked version?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: cannot connect using terminal nor pgaccess
@ 2001-05-21 15:00  Peter Eisentraut <peter_e@gmx.net>
  parent: Jaume Teixi <teixi@6tems.com>
  2 siblings, 1 reply; 8+ messages in thread

From: Peter Eisentraut @ 2001-05-21 15:00 UTC (permalink / raw)
  To: Jaume Teixi <teixi@6tems.com>; +Cc: pgsql-admin

Jaume Teixi writes:

> $ psql -d template1 -U postgres
> psql: Peer authentication failed for user 'postgres'

There is no "peer" authentication type in any official PostgreSQL release.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: cannot connect using terminal nor pgaccess
@ 2001-05-21 15:14  Jaume Teixi <teixi@6tems.com>
  parent: Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 8+ messages in thread

From: Jaume Teixi @ 2001-05-21 15:14 UTC (permalink / raw)
  To: pgsql-admin

on day of Mon, 21 May 2001 17:00:19 +0200 (CEST), the message from Peter
Eisentraut <peter_e@gmx.net> says:

> Jaume Teixi writes:
> 
> > $ psql -d template1 -U postgres
> > psql: Peer authentication failed for user 'postgres'
> 
> There is no "peer" authentication type in any official PostgreSQL
release.

he, I hope this is the unix socket method that Olly is developing on the
current debian unstable release 7.1.1-3
isn't?

but why the tcp/ip also doesn't works ?

teixi@thinkpad:~$ grep -v ^# /etc/postgresql/pg_hba.conf | grep -i host   

host         all         127.0.0.1     255.255.255.0       ident sameuser
host         all         0.0.0.0       0.0.0.0             reject

suid postgres works

teixi@thinkpad:~$ su - postgres -- psql template1

but without suid doesnt'

teixi@thinkpad:~$ psql -d template1 -U postgres -h localhost -p 5432
psql: IDENT authentication failed for user 'postgres'

any points ?

thanks

-- 
Jaume Teixi
    CTO 
    6TEMS - Ducform, SA
    http://www.6tems.com



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: cannot connect using terminal nor pgaccess
@ 2001-05-21 17:13  Peter Eisentraut <peter_e@gmx.net>
  parent: Jaume Teixi <teixi@6tems.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Peter Eisentraut @ 2001-05-21 17:13 UTC (permalink / raw)
  To: Jaume Teixi <teixi@6tems.com>; +Cc: pgsql-admin

Jaume Teixi writes:

> but why the tcp/ip also doesn't works ?
>
> teixi@thinkpad:~$ grep -v ^# /etc/postgresql/pg_hba.conf | grep -i host
>
> host         all         127.0.0.1     255.255.255.0       ident sameuser
                                                                   ^^^^^^^^
> host         all         0.0.0.0       0.0.0.0             reject

> teixi@thinkpad:~$ psql -d template1 -U postgres -h localhost -p 5432
  ^^^^^                                  ^^^^^^^^
> psql: IDENT authentication failed for user 'postgres'

"sameuser" means "same user".  Please read up on the details of ident
authentication.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: cannot connect using terminal nor pgaccess
@ 2001-05-22 06:50  Dronamraju Rajesh <drajesh80@yahoo.com>
  parent: Jaume Teixi <teixi@6tems.com>
  2 siblings, 0 replies; 8+ messages in thread

From: Dronamraju Rajesh @ 2001-05-22 06:50 UTC (permalink / raw)
  To: Jaume Teixi <teixi@6tems.com>; pgsql-admin

also try using -i option along with other options.
else all seems to be fine

regards,
Rajesh.

--- Jaume Teixi <teixi@6tems.com> wrote:
> $ psql -d template1 -U postgres
> psql: Peer authentication failed for user 'postgres'
> 
> 
> $ psql -d template1 -U postgres -h localhost -p 5432
> psql: IDENT authentication failed for user
> 'postgres'
> 
> $ grep -v ^# /etc/postgresql/pg_hba.conf | grep -i
> sameuser
> local        all                                    
>       peer sameuser
> host         all         127.0.0.1     255.255.255.0
>       ident sameuser
> 
> $ su - postgres -- psql template1
> Password: 
> Welcome to psql, the PostgreSQL interactive
> terminal.
> 
> Type:  \copyright for distribution terms
>        \h for help with SQL commands
>        \? for help on internal slash commands
>        \g or terminate with semicolon to execute
> query
>        \q to quit
> 
> template1=# select postgres from pg_user;
>    usename   | usesysid | usecreatedb | usetrace |
> usesuper | usecatupd | 
> passwd  | valuntil 
>
-------------+----------+-------------+----------+----------+-----------+----------+----------
>  postgres    |       31 | t           | t        | t
>        | t         |
> ******** | 
> 
> 
> what I am missing in this case ?
> 
> thanks!
> 
> -- 
> Jaume Teixi
>     CTO 
>     6TEMS - Ducform, SA
>     http://www.6tems.com
> 
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
>     (send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: cannot connect using terminal nor pgaccess
@ 2001-05-22 14:30  Thalis A. Kalfigopoulos <thalis@cs.pitt.edu>
  parent: Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 8+ messages in thread

From: Thalis A. Kalfigopoulos @ 2001-05-22 14:30 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Jaume Teixi <teixi@6tems.com>; pgsql-admin

On Mon, 21 May 2001, Peter Eisentraut wrote:

> Jaume Teixi writes:
> 
> > but why the tcp/ip also doesn't works ?
> >
> > teixi@thinkpad:~$ grep -v ^# /etc/postgresql/pg_hba.conf | grep -i host
> >
> > host         all         127.0.0.1     255.255.255.0       ident sameuser
>                                                                    ^^^^^^^^
> > host         all         0.0.0.0       0.0.0.0             reject
> 
> > teixi@thinkpad:~$ psql -d template1 -U postgres -h localhost -p 5432
>   ^^^^^                                  ^^^^^^^^
> > psql: IDENT authentication failed for user 'postgres'
> 
> "sameuser" means "same user".  Please read up on the details of ident
> authentication.
> 
> -- 
> Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 

I'm not that familiar with pg yet, but maybe his problem is with the auth line:
host         all         127.0.0.1     255.255.255.0       ident sameuser

How can an IP going through mask 255.255.255.0 yield x.x.x.1 ? Shouldn't the netmask be 255.255.255.255?

regards,
thalis




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: cannot connect using terminal nor pgaccess
@ 2001-05-22 14:54  Peter Eisentraut <peter_e@gmx.net>
  parent: Thalis A. Kalfigopoulos <thalis@cs.pitt.edu>
  0 siblings, 0 replies; 8+ messages in thread

From: Peter Eisentraut @ 2001-05-22 14:54 UTC (permalink / raw)
  To: Thalis A. Kalfigopoulos <thalis@cs.pitt.edu>; +Cc: Jaume Teixi <teixi@6tems.com>; pgsql-admin

Thalis A. Kalfigopoulos writes:

> I'm not that familiar with pg yet, but maybe his problem is with the auth line:
> host         all         127.0.0.1     255.255.255.0       ident sameuser
>
> How can an IP going through mask 255.255.255.0 yield x.x.x.1 ? Shouldn't the netmask be 255.255.255.255?

Since the error message was "ident authentication failed", this means that
the system has already decided to use ident authentication, which means
that the line was correct for that part.

As for the netmask, it doesn't matter.  See the documentation for the
precise logic.

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter




^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2001-05-22 14:54 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-21 14:19 cannot connect using terminal nor pgaccess Jaume Teixi <teixi@6tems.com>
2001-05-21 14:57 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-05-21 15:00 ` Peter Eisentraut <peter_e@gmx.net>
2001-05-21 15:14   ` Jaume Teixi <teixi@6tems.com>
2001-05-21 17:13     ` Peter Eisentraut <peter_e@gmx.net>
2001-05-22 14:30       ` Thalis A. Kalfigopoulos <thalis@cs.pitt.edu>
2001-05-22 14:54         ` Peter Eisentraut <peter_e@gmx.net>
2001-05-22 06:50 ` Dronamraju Rajesh <drajesh80@yahoo.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox