pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedAuthentification
5+ messages / 4 participants
[nested] [flat]
* Authentification
@ 2001-01-11 09:32 Peter Maas <pm@mrinfo.de>
0 siblings, 0 replies; 5+ messages in thread
From: Peter Maas @ 2001-01-11 09:32 UTC (permalink / raw)
To: pgsql-general
Hi,
in our company we access a postgres database from Windows clients
via ODBC. Authentication type was trust but that no longer suffices.
I tried several alternatives but I don't want to build a second
password database in pg_shadow. Is it possible for postgres to
authenticate using the /etc/shadow passwords or /etc/smbpasswd
or pam authentication?
BTW what is the purpose of pg_pwd? I found no explanation in the
docs.
Thanks for your help.
Regards, Peter.
--
------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail pm@mrinfo.de
------------------------------------------------------------------
^ permalink raw reply [nested|flat] 5+ messages in thread
* Authentification
@ 2001-06-21 09:13 tillea@rki.de
0 siblings, 1 reply; 5+ messages in thread
From: tillea@rki.de @ 2001-06-21 09:13 UTC (permalink / raw)
To: ; +Cc: pgsql-general
Hello,
I´m using PostgreSQL 7.1.2 (from Debian). My pg_hba.conf looks like
# default
local all peer sameuser
host all 127.0.0.1 255.0.0.0 ident sameuser
# added myself to cope with the problem
host all 127.0.0.1 255.0.0.0 crypt
To check, whether users can connect via crypt method I wrote a small
python script:
#!/usr/bin/python
def hello():
import sys
from pg import DB
conn = DB('test',user='testuser',passwd='test')
x = conn.query("SELECT * from testtable")
return x
print hello()
/var/log/postgresql.log shows:
Peer authentication failed for user 'testuser'
I can correctly log in on the Linux system with the testuser account
and the script works if I run it from this account *and* deleting
the passwd option from the connection string - but that´s the ident
authenification method. With password option the connection can not
be established.
Moreover I have read the postgresql docs especially auth-methods.html.
I tried to alter the pg_shadow password using
test=# alter user testuser with password 'test' ;
but I´m not sure if this works because of the strange sounding
paragraph in auth-methods.html:
Note that using alternative passwords like this means that one can no
longer use ALTER USER to change one's password. It will still appear
to work but the password one is actually changing is not the password
that the system will end up using.
I also gave those alternate passwords a try and did
/usr/lib/postgresql/bin/pg_passwd /etc/postgresql/passwd
Username: testuser
New password:
Re-enter new password:
and changed the pg_hba.conf line to
host all 127.0.0.1 255.0.0.0 crypt passwd
But nothing changed.
Can anybody help me out this trouble?
Kind regards
Andreas.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Authentification
@ 2001-06-21 15:19 Tom Lane <tgl@sss.pgh.pa.us>
parent: tillea@rki.de
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2001-06-21 15:19 UTC (permalink / raw)
To: tillea@rki.de; +Cc: pgsql-general
tillea@rki.de writes:
> I´m using PostgreSQL 7.1.2 (from Debian). My pg_hba.conf looks like
> # default
> local all peer sameuser
There is no such authentication type as "peer".
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Authentification
@ 2001-06-22 07:36 Andreas Tille <tillea@rki.de>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Tille @ 2001-06-22 07:36 UTC (permalink / raw)
To: Debian PostgreSQL Liste <debian-postgresql@mailman.atnet.at>; +Cc: pgsql-general
On Thu, 21 Jun 2001, Tom Lane wrote:
> > I´m using PostgreSQL 7.1.2 (from Debian). My pg_hba.conf looks like
>
> > # default
> > local all peer sameuser
>
> There is no such authentication type as "peer".
Hmm, seems to be a bug in the Debian package.
From /etc/postgresql/pg_hba.conf:
# peer: Authentication is done as for ident, but by obtaining user
# identification from the Unix socket credentials. (This
# service is only supported by a few operating systems. If
# it is not usable in a particular implementation, use of
# this method will cause an error.) Username mapping is
# exactly the same as for ident.
BUT:
If I remove the above line I get
_pg.error: No pg_hba.conf entry for host localhost, user testuser, database test
conn = DB('test')
which worked *with* the line. The the peer authentication type "peer" seems
to exist in the way it is described in the pg_hba.conf comment and is
necessary for the socket authentification via ident.
The same message do I get when trying the crypt athentication as in my
original question.
So it seems the line is evident for my setup.
Kind regards
Andreas.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Re: Authentification
@ 2001-06-22 13:44 Tom Lane <tgl@sss.pgh.pa.us>
parent: Andreas Tille <tillea@rki.de>
0 siblings, 0 replies; 5+ messages in thread
From: Tom Lane @ 2001-06-22 13:44 UTC (permalink / raw)
To: Andreas Tille <tillea@rki.de>; +Cc: Debian PostgreSQL Liste <debian-postgresql@cochrane.atnet.at>; pgsql-general
Andreas Tille <tillea@rki.de> writes:
> On Thu, 21 Jun 2001, Tom Lane wrote:
>> There is no such authentication type as "peer".
> Hmm, seems to be a bug in the Debian package.
>> From /etc/postgresql/pg_hba.conf:
> # peer: Authentication is done as for ident, but by obtaining user
> # identification from the Unix socket credentials. (This
> # service is only supported by a few operating systems. If
> # it is not usable in a particular implementation, use of
> # this method will cause an error.) Username mapping is
> # exactly the same as for ident.
Where did that come from? There is certainly no such thing in any
official Postgres release. Is Debian shipping locally-modified
Postgres? If so I think they need to label it as such.
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2001-06-22 13:44 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-01-11 09:32 Authentification Peter Maas <pm@mrinfo.de>
2001-06-21 09:13 Authentification tillea@rki.de
2001-06-21 15:19 ` Tom Lane <tgl@sss.pgh.pa.us>
2001-06-22 07:36 ` Andreas Tille <tillea@rki.de>
2001-06-22 13:44 ` Tom Lane <tgl@sss.pgh.pa.us>
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