Mapping usernames for local/loopback connections

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

Mapping usernames for local/loopback connections

От:
Jan Eden <temp@janeden.org>
Дата:
Hi,

I'd like to use the following in pga_hba.conf:

local   all             all                                     trust map=mymap
host    all             all             127.0.0.1/32            trust map=mymap

where pga_ident.conf contains

mymap jan dbuser

With this setup in place, the server is not started (and since I don't know how to turn on debug mode for pg_ctl, I don't know why).

Could anyone point me in the right direction?

Thanks a lot,
Jan

Re: Mapping usernames for local/loopback connections

От:
Jasen Betts <jasen@xnet.co.nz>
Дата:
On 2011-01-02, Jan Eden  wrote:

> local   all             all                                     trust map=mymap
> host    all             all             127.0.0.1/32            trust map=mymap


Don't use 'map=mymap' , just use 'mymap'.


-- 
⚂⚃ 100% natural

Re: Mapping usernames for local/loopback connections

От:
Jan Eden <me@janeden.net>
Дата:

On 02.01.2011, at 13:03, Jasen Betts wrote:

> On 2011-01-02, Jan Eden  wrote:
> 
>> local   all             all                                     trust map=mymap
>> host    all             all             127.0.0.1/32            trust map=mymap
> 
> 
> Don't use 'map=mymap' , just use 'mymap'.

Thanks a lot. I already tried that, and it still does not work. Besides, the manual explicitly uses the 'option=value' syntax:

http://www.postgresql.org/docs/9.0/static/auth-pg-hba-conf.html

Could there be anything else I overlooked?

- Jan

Re: Mapping usernames for local/loopback connections

От:
Jan Eden <temp@janeden.org>
Дата:

On 02.01.2011, at 13:03, Jasen Betts wrote:

> On 2011-01-02, Jan Eden  wrote:
> 
>> local   all             all                                     trust map=mymap
>> host    all             all             127.0.0.1/32            trust map=mymap
> 
> 
> Don't use 'map=mymap' , just use 'mymap'.

Thanks a lot. I already tried that, and it still does not work. Besides, the manual explicitly uses the 'option=value' syntax:

http://www.postgresql.org/docs/9.0/static/auth-pg-hba-conf.html

Could there be anything else I overlooked?

- Jan

Re: Mapping usernames for local/loopback connections

От:
Jan Eden <temp@janeden.org>
Дата:

On 02.01.2011, at 14:22, Jan Eden wrote:

> 
> On 02.01.2011, at 13:03, Jasen Betts wrote:
> 
>> On 2011-01-02, Jan Eden  wrote:
>> 
>>> local   all             all                                     trust map=mymap
>>> host    all             all             127.0.0.1/32            trust map=mymap
>> 
>> 
>> Don't use 'map=mymap' , just use 'mymap'.
> 
> Thanks a lot. I already tried that, and it still does not work. Besides, the manual explicitly uses the 'option=value' syntax:
> 
> http://www.postgresql.org/docs/9.0/static/auth-pg-hba-conf.html
> 
> Could there be anything else I overlooked?

Mystery solved:

2011-01-02 15:32:02 CET LOG:  authentication option "map" is only valid for authentication methods ident, krb5, gssapi, sspi and cert

Still, is there any way to achieve a mapping of local system accounts to db accounts while using the "trust" authentication method?

- Jan

Re: Mapping usernames for local/loopback connections

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Jan Eden  writes:
> Still, is there any way to achieve a mapping of local system accounts to db accounts while using the "trust" authentication method?

Why would you need one?  You can just log in as whatever user you want.
If you're trying to avoid including the username in connection
parameters, consider setting PGUSER=whatever in your environment.

			regards, tom lane
FAQ