Обсуждение: password auth woes on sparc64/FreeBSD

Поиск
Список
Период
Сортировка

password auth woes on sparc64/FreeBSD

От
Volodymyr Kostyrko
Дата:
It seems to me that auth on the local interface(?) is broken somehow on
sparc64.

[data/pg_hba.conf]
local postgres,template1 all trust

local postgres,template1 all md5
host postgres,template1 all 0.0.0.0/0 md5
host postgres,template1 all ::/0 md5
[--]

Well, what I really want to do is to remove the trust line from config.
But that way i need a .pgpass file so the server can start/control
itself without asking me for password. And if i want .pgpass file i need
some auth.

[session transcript/same machine]
 > psql -U pgsql postgres
Welcome to psql 8.2.4, the PostgreSQL interactive terminal.

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

postgres=# alter role pgsql password 'somepass';
ALTER ROLE
postgres=# \q
 > psql -h localhost -U pgsql postgres
Password for user pgsql:
psql: FATAL:  password authentication failed for user "pgsql"
[--]

It fails for any user and any password.

[session transcript/other machine]
 > psql -h blade -U pgsql postgres
Password for user pgsql:
Welcome to psql 8.2.4, the PostgreSQL interactive terminal.

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

postgres=#
[--]

But I can log from another machine flawlessly...

 > uname -a
FreeBSD blade.lan 6.2-STABLE FreeBSD 6.2-STABLE #13: Tue Jun  5 17:06:57
EEST 2007     arcade@blade.lan:/usr/obj/usr/src/sys/BLADE  sparc64

PS: Can assist in debugging if someone would point me what and how.

--
Sphinx of black quartz judge my vow!

Re: password auth woes on sparc64/FreeBSD

От
Zdenek Kotala
Дата:
I tested on Solaris AMD64 and Sparc v240 (64bit) and it works for me. Do
you use 32bit or 64bit version of postgreSQL and what you have in .pgpass?

        Zdenek

Volodymyr Kostyrko wrote:
> It seems to me that auth on the local interface(?) is broken somehow on
> sparc64.
>
> [data/pg_hba.conf]
> local postgres,template1 all trust
>
> local postgres,template1 all md5
> host postgres,template1 all 0.0.0.0/0 md5
> host postgres,template1 all ::/0 md5
> [--]
>
> Well, what I really want to do is to remove the trust line from config.
> But that way i need a .pgpass file so the server can start/control
> itself without asking me for password. And if i want .pgpass file i need
> some auth.
>
> [session transcript/same machine]
>  > psql -U pgsql postgres
> Welcome to psql 8.2.4, the PostgreSQL interactive terminal.
>
> Type:  \copyright for distribution terms
>        \h for help with SQL commands
>        \? for help with psql commands
>        \g or terminate with semicolon to execute query
>        \q to quit
>
> postgres=# alter role pgsql password 'somepass';
> ALTER ROLE
> postgres=# \q
>  > psql -h localhost -U pgsql postgres
> Password for user pgsql:
> psql: FATAL:  password authentication failed for user "pgsql"
> [--]
>
> It fails for any user and any password.
>
> [session transcript/other machine]
>  > psql -h blade -U pgsql postgres
> Password for user pgsql:
> Welcome to psql 8.2.4, the PostgreSQL interactive terminal.
>
> Type:  \copyright for distribution terms
>        \h for help with SQL commands
>        \? for help with psql commands
>        \g or terminate with semicolon to execute query
>        \q to quit
>
> postgres=#
> [--]
>
> But I can log from another machine flawlessly...
>
>  > uname -a
> FreeBSD blade.lan 6.2-STABLE FreeBSD 6.2-STABLE #13: Tue Jun  5 17:06:57
> EEST 2007     arcade@blade.lan:/usr/obj/usr/src/sys/BLADE  sparc64
>
> PS: Can assist in debugging if someone would point me what and how.
>

Re: password auth woes on sparc64/FreeBSD

От
Volodymyr Kostyrko
Дата:
Zdenek Kotala wrote:
> I tested on Solaris AMD64 and Sparc v240 (64bit) and it works for me. Do
> you use 32bit or 64bit version of postgreSQL and what you have in .pgpass?

I use sparc64 and my .pgpass file was like:
localhost:5432:*:pgsql:password

Actually i have already found the cause. Authorization fails when
postgresql-client was compiled with -O3 but it works otherwise. Maybe it
is just another gcc optimization issue.

--
Sphinx of black quartz judge my vow!

Re: password auth woes on sparc64/FreeBSD

От
Zdenek Kotala
Дата:
Volodymyr Kostyrko wrote:
> Zdenek Kotala wrote:
>> I tested on Solaris AMD64 and Sparc v240 (64bit) and it works for me.
>> Do you use 32bit or 64bit version of postgreSQL and what you have in
>> .pgpass?
>
> I use sparc64 and my .pgpass file was like:
> localhost:5432:*:pgsql:password
>
> Actually i have already found the cause. Authorization fails when
> postgresql-client was compiled with -O3 but it works otherwise. Maybe it
> is just another gcc optimization issue.

OK. Good to know. GCC also does not generate much optimal SPARC code.
Unfortunately, If you use FreeBSD on SPARC, I think there is no another
possibility (another C compiler).

        Zdenek