BUG #1185: Problem with last added user in group (lack of rights)

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

BUG #1185: Problem with last added user in group (lack of rights)

От:
"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org>
Дата:
The following bug has been logged online:

Bug reference:      1185
Logged by:          Chris Ksiezyk

Email address:      kksiezyk@alpha.pl

PostgreSQL version: 7.4

Operating system:   FreeBSD 4.8 (running on AMD Athlon) (PostgreSQL-7.4.1)

Description:        Problem with last added user in group (lack of rights)

Details: 

In words:
Last user added to group doesn't have right to connect to database although 
group have necessary rights (in pg_hba.conf). Other users in this group can 
connect to database. If we add another user to group, previous added user 
(which couldn't connect) can finally connect to db. 
---
Step by step:

--- DB SERVER (f.e 192.168.240.50) ---
  create database a_test;
  create group a_test;
  create user a_test1 password '1' in group a_test;
  create user a_test2 password '1' in group a_test;
  create user a_test3 password '1' in group a_test;

  ---in pg_hba.conf---
  host a_test +a_test 192.168.240.100 255.255.255.255 md5
  ---------------------

  --- bash ---
  killall -HUP postgres

--- PROD SERVER (192.168.240.100) ---
  --- bash ---
  command: psql -h 192.168.240.50 -d a_test -U a_test1
  effect: Password:  (proper behavoiur)
  command: psql -h 192.168.240.50 -d a_test -U a_test2
  effect: Password:  (proper behavoiur)
  command: psql -h 192.168.240.50 -d a_test -U a_test3
  effect: psql: FATAL:  no pg_hba.conf entry for host "192.168.240.100", 
user "a_test3", database "a_test" (IMPROPER behavoiur!) 

--- let's back to DB SERVER ----
  create user a_test4 password '1' in group a_test;

--- and again on PROD SERVER ---
  --- bash ---
  command: psql -h 192.168.240.50 -d a_test -U a_test1
  effect: Password:  (proper behavoiur)
  command: psql -h 192.168.240.50 -d a_test -U a_test2
  effect: Password:  (proper behavoiur)
  command: psql -h 192.168.240.50 -d a_test -U a_test3
  effect: Password:  (proper behavoiur)
  command: psql -h 192.168.240.50 -d a_test -U a_test4
  effect: psql: FATAL:  no pg_hba.conf entry for host "192.168.240.100", 
user "a_test4", database "a_test" (IMPROPER behavoiur!) 

That's all. I don't know if it isn't fixed in newest versions but i haven't 
found anything about it. 

PS. Sorry for any mistakes in this text.

Re: BUG #1185: Problem with last added user in group (lack of rights)

От:
Gaetano Mendola <mendola@bigfoot.com>
Дата:
PostgreSQL Bugs List wrote:

> The following bug has been logged online:
> 
> Bug reference:      1185
> Logged by:          Chris Ksiezyk
> 
> Email address:      kksiezyk@alpha.pl
> 
> PostgreSQL version: 7.4
> 
> Operating system:   FreeBSD 4.8 (running on AMD Athlon) (PostgreSQL-7.4.1)
> 
> Description:        Problem with last added user in group (lack of rights)
> 
> Details: 
> 
> In words:
> Last user added to group doesn't have right to connect to database although 
> group have necessary rights (in pg_hba.conf). Other users in this group can 
> connect to database. If we add another user to group, previous added user 
> (which couldn't connect) can finally connect to db. 

Reproduced on 7.4 but not in 7.5devel



Regards
Gaetano Mendola
FAQ