Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 76D7E632424; Mon, 30 Nov 2009 03:29:47 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 74635-02; Mon, 30 Nov 2009 07:29:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26]) by mail.postgresql.org (Postfix) with ESMTP id 8FC146326B6; Mon, 30 Nov 2009 03:29:37 -0400 (AST) Received: by ey-out-2122.google.com with SMTP id 22so872714eye.33 for ; Sun, 29 Nov 2009 23:29:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=P0xFeqWnHGQNn7HHIgAuSD9tSv3IMRNEePj3bPIJ3Os=; b=DF29h81xN9L79GIzuatAFLffJpwAzIQsGeUmGgCW6hDpaqdZ+2/6unhORujBUdPRbI lr1Y9vHZIBNdu5u6sZuLfsTFLG0xBeddfJMP9qDeeSmtMIoRl2hgq0TsyVzqX03za38K FyklSfe2QcuR9T8bddwAY6+g7atFOYarRZPRg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=MdqfwYrGWOccfsSfrvlMIrLtWdYtik4kJzfqRT8DFyv4KcJzG0yQdq6i9QmluJ6Pm9 sjISLAEAPEu/tR2wiqcl6EYUMBCkJkEyrdRbX0HU2Zg28pHxYEFOHSePCSBfRLlQYJbX VMngG04ktCyox6PT9B9iNCbrj+Y4cOG/6fTf0= MIME-Version: 1.0 Received: by 10.216.86.65 with SMTP id v43mr1383855wee.118.1259566175632; Sun, 29 Nov 2009 23:29:35 -0800 (PST) In-Reply-To: References: <20091129174504.545219cc@db> <20091129181833.5e00ce2e@db> Date: Mon, 30 Nov 2009 10:59:35 +0330 Message-ID: Subject: Fwd: psql+krb5 From: rahimeh khodadadi To: pgsql-odbc@postgresql.org, pgsql-hackers@postgresql.org, pgsql-general@postgresql.org, pgsql-docs@postgresql.org Content-Type: multipart/alternative; boundary=0016e6d784ee7840540479919ac2 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.597 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001, NORMAL_HTTP_TO_IP=0.001 X-Spam-Level: X-Archive-Number: 200911/1268 X-Sequence-Number: 156197 --0016e6d784ee7840540479919ac2 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable ---------- Forwarded message ---------- From: rahimeh khodadadi Date: 2009/11/29 Subject: Re: psql+krb5 To: Denis Feklushkin These items have added after my sending. I repeat again my configurations: * 1) The configuration of krb5.conf is: [realms] EXAMPLE.COM =3D{ kdc=3Dstar :88 admin_server=3Dstar:749 default_domain=3D example.com } .....* 2) Then, I created principal as* " postgres/star@EXAMPLE.COM "* and its password is saved in* '/usr/local/pgsql/data/postgresql.keytab' .* (star is localhost IP, but in hosts.conf I configure like: 213.233.169.93 star) 3) I setup *postgresql.conf *as below: krb_server_keyfile =3D '/usr/local/pgsql/data/ postgresql.keytab' krb_srvname =3D 'postgres/star@EXAMPLE.COM' krb_server_hostname =3D 'star' # empty string matches any keytab en= try krb_caseins_users =3D off 4) I *create user "frank"* in Psql . 5) Then I set up* hba.conf :* host all all 0.0.0.0/0 krb5 host all all 127.0.0.1/32 krb5 When I want to connect to Postgresql, it gives error. # *kinit frank* [root@star bin]# *./psql -h star -U frank -d test* psql: *krb5_sendauth: Bad application version was sent (via sendauth)* I should mention that * both postgresql server and krb-server are in same system* and* my IP is acquring from dhcp server of university*. Where is wrong. 2009/11/29 Denis Feklushkin > On Sun, 29 Nov 2009 14:23:52 +0330 > rahimeh khodadadi wrote: > > > Thanks for your replying. My detail of configuration is: > > > > I try to setup kerberos authentication in Postgresql 8.1.18 on centos. > > > > But I have some problem. > > > > 1) The configuration of krb5.conf is: > > [realms] > > EXAMPLE.COM > > =3D{ > > > > kdc=3Dstar :88 > > admin_server=3Dstar:749 > > default_domain=3D example.com > > > > > > > > > } > > > ..... > > > > > > 2) Then, I created principal as " postgres/star@EXAMPLE.COM > > star@EXAMPLE.COM> " and its password is saved in > > > '/usr/local/pgsql/data/postgresql.keytab' . > > > > > > > > > (star is localhost IP, but in hosts.conf I configure like: > > > 213.233.169.93 star) > > > > > > 3) I setup postgresql.conf as below: > > > > > > krb_server_keyfile =3D '/usr/local/pgsql/data/ > > > postgresql.keytab' > > > krb_srvname =3D 'postgres/star@EXAMPLE.COM' > > > > > > krb_server_hostname =3D 'star' # empty string matches any > > > keytab entry > > > krb_caseins_users =3D off > > > > > > 4) I create user "frank" in Psql . > > > > > > 5) Then I set up hba.conf : > > > > > > host all all 0.0.0.0/0 > > > krb5 > > > host all all 127.0.0.1/32 > > > krb5 > > > > > > > > > When I want to connect to Postgresql, it gives error. > > > > > > # kinit frank > > > > > > [root@star bin]# ./psql -h star -U frank -d test > > > > > > psql: krb5_sendauth: Bad application version was sent (via sendauth) > > > > > > > some changes in users gives below error : > > "[root@www bin]# ./psql -h 213.233.168.249 -U postgres > > psql: Kerberos 5 authentication rejected: Wrong principal in > > request" > > > > > > > I should mention that both postgresql server and krb-server are in > > > same system and my IP is acquring from dhcp server of university. > > > Where is wrong. > > > > > > > > > > > 2009/11/29 Denis Feklushkin > > > > > On Sun, 29 Nov 2009 10:48:30 +0330 > > > rahimeh khodadadi wrote: > > > > > > > Hi, > > > > > > > > When I want to connect to psql via krb5 in Linux, it gives me > > > > error like: "[root@www bin]# ./psql -h 213.233.168.249 -U > > > > postgres psql: Kerberos 5 authentication rejected: Wrong > > > > principal in request" > > > > > > =FE=D4=CF =D7 =CC=CF=C7=C1=C8 KDC? > ^^^^^^^^^^^^^^^^ !!! > > =E9 =C5=DD=A3, =D7 =D4=C5=CB=D3=D4=C5 =CB=CF=D4=CF=D2=D9=CA =F7=D9 =C4=C1= =CC=C9 =D7=D3=D4=D2=C5=DE=C1=C0=D4=D3=D1 =D0=D2=CF=C2=C5=CC=D9 =D7 =C9=CD= =C5=CE=C1=C8 > =D0=D2=C9=CE=C3=C9=D0=C1=CC=CF=D7 =C9 =D3=D4=D2=C1=CE=CE=D9=C5 =DA=C1=D0= =C9=D3=C9 "" > > =F0=D2=C9 =CE=C1=D3=D4=D2=CF=CA=CB=C5 =D7=C1=D6=CE=CF =DE=D4=CF=C2=D9 =CE= =C9=DE=C5=C7=CF =DC=D4=CF=C7=CF =CE=C5=C2=D9=CC=CF > --=20 With Best Regards Miss.KHodadadi --=20 With Best Regards Miss.KHodadadi --0016e6d784ee7840540479919ac2 Content-Type: text/html; charset=KOI8-R Content-Transfer-Encoding: quoted-printable

---------- Forwarded message ----------<= br>From: rahimeh khodadadi <rahimeh.khodadadi@gm= ail.com>
Date: 2009/11/29
Subject: Re: psql+krb5
To: Denis Feklushkin <denis.feklushkin@gmail.com>= ;


These items have added after my sending.
=9A
I repeat a= gain my configurations:
=9A

1) The configuration of=9A= krb5.conf is:
=9A[realms]
=9A=9A EXAMPLE.COM =3D{

=9A=9A=9A=9A kdc=3Dstar :88
=9A=9A=9A=9A admin_server=3Dstar:749
=9A= =9A=9A=9A default_domain=3D example.com
}
.....


2) Then, I created princi= pal as "=9A postgres/star@EXAMPLE.COM " and its password is saved in = 9;/usr/local/pgsql/data/postgresql.keytab' .


(star is localhost IP, but in hosts.conf I configure like: 213.233.169.= 93 =9A star)

3) I setup postgresql.conf as below:

krb_= server_keyfile =3D '/usr/local/pgsql/data/
postgresql.keytab'
krb_srvname =3D 'postgres/star@EXAMPLE.COM'

krb_server_hostname= =3D 'star'=9A=9A =9A =9A=9A=9A # empty string matches any keytab e= ntry
krb_caseins_users =3D off

4) I create user "frank"=9A in Psql .

5) Then I= set up hba.conf :

host=9A=9A=9A all=9A=9A=9A=9A=9A=9A= =9A=9A all=9A=9A=9A=9A=9A=9A=9A=9A 0.0.0.0/0=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A=9A krb5
host=9A=9A=9A all=9A=9A=9A=9A=9A=9A=9A=9A all=9A=9A=9A=9A=9A=9A=9A=9A 127.0.0.1/32=9A=9A=9A=9A= =9A=9A=9A=9A=9A=9A krb5


When I want to connect to Postgresql, it gives error.

# kinit fr= ank

[root@star bin]# ./psql -h star=9A -U frank=9A -d test

psql: krb5_sendauth: Bad application version w= as sent (via sendauth)

I should men= tion that=9A both postgresql server and krb-server are in same system and my IP is acquring from dhcp server=9A of university.=9A Where = is wrong.

2009/11/29 Denis Feklushkin <denis.feklushkin@gmail.com>
On Sun, 29 Nov 2009 14:23:52 +0330
rahimeh khodadadi <rahimeh.khodadadi@gmail.com> wrote:

> Thanks for your replying. My detail of configuration is: >
> I try to setup kerberos authentication in Postgresql 8.1.18 on centos.=
>
> But I have some problem.
>
> 1) The configuration of =9Akrb5.conf is:
> =9A[realms]
> =9A EXAMPLE.COM= <http://example.c= om/><http://EXAM= PLE.COM
> <http://example.c= om/>> =3D{
>
> =9A =9A kdc=3Dstar :88
> =9A =9A admin_server=3Dstar:749
> =9A =9A default_domain=3D example.com<ht= tp://example.com
> >
> > >
> > }
> > .....
> >
> > 2) Then, I created principal as " =9Apostgres/star@EXAMPLE.COM<mailto:
> > star@EXAMPL= E.COM> " and its password is saved in
> > '/usr/local/pgsql/data/postgresql.keytab' .
> >
> >
> > (star is localhost IP, but in hosts.conf I configure like:
> > 213.233.169.93 star)
> >
> > 3) I setup postgresql.conf as below:
> >
> > krb_server_keyfile =3D '/usr/local/pgsql/data/
> > postgresql.keytab'
> > krb_srvname =3D 'postgres/star@EXAMPLE.COM<mailto:star@EXAMPLE.COM>'
> >
> > krb_server_hostname =3D 'star' =9A =9A =9A =9A # empty st= ring matches any
> > keytab entry
> > krb_caseins_users =3D off
> >
> > 4) I create user "frank" =9Ain Psql .
> >
> > 5) Then I set up hba.conf :
> >
> > host =9A =9Aall =9A =9A =9A =9A all =9A =9A =9A =9A 0.0.0.0/0<http://0.0.0.0/0>
> > =9Akrb5
> > host =9A =9Aall =9A =9A =9A =9A all =9A =9A =9A =9A 127.0.0.1/32<http://127.0.0.1/32>
> > =9A krb5
> >
> >
> > When I want to connect to Postgresql, it gives error.
> >
> > # kinit frank
> >
> > [root@star bin]# ./psql -h star =9A-U frank =9A-d test
> >
> > psql: krb5_sendauth: Bad application version was sent (via sendau= th)
> >
>
> some changes in users gives below error :
> "[root@www bin]# ./psql -h 213.233.168.249 =9A-U postgres
> =9A psql: Kerberos 5 authentication rejected: =9AWrong principal in > request"
>
>
> > I should mention that =9Aboth postgresql server and krb-server ar= e in
> > same system and my IP is acquring from dhcp server =9Aof universi= ty.
> > Where is wrong.
> >
>
>
>
> 2009/11/29 Denis Feklushkin <denis.feklushkin@gmail.com>
>
> > On Sun, 29 Nov 2009 10:48:30 +0330
> > rahimeh khodadadi <rahimeh.khodadadi@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > When I want to connect to psql via krb5 in Linux, it gives m= e
> > > error like: "[root@www bin]# ./psql -h 213.233.168.249 = =9A-U
> > > postgres psql: Kerberos 5 authentication rejected: =9AWrong<= br> > > > principal in request"
> >
> > =FE=D4=CF =D7 =CC=CF=C7=C1=C8 KDC?
=9A =9A^^^^^^^^^^^^^^^^ !!!

=E9 =C5=DD=A3, =D7 =D4=C5=CB=D3=D4=C5 =CB=CF=D4=CF=D2=D9=CA =F7=D9 =C4=C1= =CC=C9 =D7=D3=D4=D2=C5=DE=C1=C0=D4=D3=D1 =D0=D2=CF=C2=C5=CC=D9 =D7 =C9=CD= =C5=CE=C1=C8
=D0=D2=C9=CE=C3=C9=D0=C1=CC=CF=D7 =C9 =D3=D4=D2=C1=CE=CE=D9=C5 =DA=C1=D0=C9= =D3=C9 "<mailto:star@EXAMPLE.COM>"

=F0=D2=C9 =CE=C1=D3=D4=D2=CF=CA=CB=C5 =D7=C1=D6=CE=CF =DE=D4=CF=C2=D9 =CE= =C9=DE=C5=C7=CF =DC=D4=CF=C7=CF =CE=C5=C2=D9=CC=CF



--
With Best Regards
Miss.KHodadadi



--
With Best Regards
Mis= s.KHodadadi
--0016e6d784ee7840540479919ac2--