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

Re: postgresql demond



On Mon, Feb 12, 2001 at 11:02:51PM +0000, Oliver Elphick wrote:
> Olivier Billet wrote:
>   >Hi all,
>   >
>   >I'm using postgresql and can use psql, but I dont 
>   >know how to allow people to connect to the databases. 
>   >I mean even users on the local host (my box) cant 
>   >connect. It seems that it's a matter of -i switch 
>   >before runing the postmaster.
>  
> -i allows users to connect over TCP/IP; this is not necessary if they are
> on the same machine.

the system throwed an error message when attempting to connect to 
the database via the pgaccess front end.
(Error attempting to connect to database [...] are you running 
postmaster with the -i option, is your system allowing tcpip 
connections)

Now I've turned the PGALLOWTCPIP to yes following Ray advice in 
the postmaster file, users are not receiving the error message. 
But now, there is the issue of identification.

> Have you created usernames in postgresql for these other users?

I think so. For example, I have user X that is allowed to manage 
the database DB.
Now if X type:

  $ psql DB
  Welcome to the POSTGRESQL interactive sql monitor:
    Please read the file COPYRIGHT for copyright terms of POSTGRESQL
  [PostgreSQL 6.5.3 on i686-pc-linux-gnu, compiled by gcc 2.95.2]
  
     type \? for help on slash commands
     type \q to quit
     type \g or terminate with semicolon to execute query
   You are currently connected to the database: DB
  
  DB=> \q
  $


But now if X uses the front-end pgaccess he gets this error 
message:
IDENT authentification failed for user 'X'




I don't know what's the more secure way to set up the
/etc/postgresql/pg_hba.conf
and also what's the way to set up passwords for users.

For example, if you want to allow everyone outside to connect 
to your database (just to read for example), you have to set 
up some general account.

Olivier



Reply to: