[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: postgreql et Gui tools + sécurité



Le 22/09/04 à 16:38, Jean-Jacques Duclaux écrivait:

> Votre aide me fait chaud au coeur par ce que là je suis au bord du 
> pétage de plombs.
> 
> rappel: je veux utiliser mogwaï avec mon serveur postgresql.
> 
> voici ce que j'ai ajouté au pg_hba.conf:
> 
> tcpsocket= true
> host      all   my.ip.adress my.submask     trust
> local     all    my.ip.adress my.submask     trust
La dernière ligne est fausse !
Je t'ai dit que local et localhost sont 2 choses différentes.
En local on ne passe pas par le réseau. Donc il n'y a pas de
my.ip.adress, ni de my.submask.

Je ne suis pas sûr que Postgres démarre avec ça.

C'est expliqué dans le fichier pg_hba.conf mais vu la façon dont tu
écris adress et submask c'est peut-être pas évident de comprendre
quelque chose pour toi ( address and netmask ! )

Voilà un extrait de mon fichier pg_hba.conf qui marche:

  # TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD
  # Database administrative login by UNIX sockets
  local   all         postgres                                        ident sameuser
  #
  # All other connections by UNIX sockets
  local   all         all                                             ident sameuser
  #
  # All IPv4 connections from localhost
  host    all         all         127.0.0.1         255.255.255.255   password
  host    all         all         192.168.13.30     255.255.255.0     password
  #
  # All IPv6 localhost connections
  host    all         all         ::1               ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff        ident sameuser
  host    all         all         ::ffff:127.0.0.1/128                ident sameuser
  #
  # reject all other connection attempts
  host    all         all         0.0.0.0           0.0.0.0           reject

> ensuite j'ai redemmarré postgresql avec l'option -i
 
WHAT's a pity !

On fait sous root en mode console:
/etc/init.d/postgresql stop
puis après retour du prompt
/etc/init.d/postgresql start

> Meilleures salutations.
Bon courage
Jean-Pierre



Reply to: