Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-05 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@commandprompt.com writes: For example, perhaps there could be a new pair of functions pg_read_hba_file/pg_write_hba_file that would work even if the files are placed in other directories, but they (Debian) would need to propose it. I don't remember they had to provide

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-02 Thread dipti shah
Thanks Richard and Alvaro. The show hba_file is great solution. Thanks a ton. Could you tell me from where to get all such commands? Thanks, Dip On Mon, Feb 1, 2010 at 9:43 PM, Alvaro Herrera alvhe...@commandprompt.comwrote: dipti shah escribió: Thanks Richard. those chapters are very useful.

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-02 Thread dipti shah
Techdb=# show hba_file; hba_file -- /etc/postgresql/8.4/main/pg_hba.conf (1 row) Moreover, is there anyway to view content of this file from stored in above location Techdb command prompt itself. Techdb=# cat

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-02 Thread Richard Huxton
On 02/02/10 09:55, dipti shah wrote: Thanks Richard and Alvaro. The show hba_file is great solution. Thanks a ton. Could you tell me from where to get all such commands? All the configuration settings are listed in Chapter 18: http://www.postgresql.org/docs/8.4/static/runtime-config.html

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-02 Thread Richard Huxton
On 02/02/10 09:58, dipti shah wrote: Techdb=# show hba_file; hba_file -- /etc/postgresql/8.4/main/pg_hba.conf (1 row) Ah! you're running a Debian-based system by the look of it. Moreover, is there anyway to view content of this file from

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-02 Thread dipti shah
Wow!!..that was too quick. Thanks Richard. On Tue, Feb 2, 2010 at 3:29 PM, Richard Huxton d...@archonet.com wrote: On 02/02/10 09:55, dipti shah wrote: Thanks Richard and Alvaro. The show hba_file is great solution. Thanks a ton. Could you tell me from where to get all such commands? All

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-02 Thread Alvaro Herrera
dipti shah escribió: Techdb=# show hba_file; hba_file -- /etc/postgresql/8.4/main/pg_hba.conf (1 row) Moreover, is there anyway to view content of this file from stored in above location Techdb command prompt itself. Techdb=# cat

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-02 Thread Tim Bruce - Postgres
On Tue, February 2, 2010 08:23, Alvaro Herrera wrote: dipti shah escribió: Techdb=# show hba_file; hba_file -- /etc/postgresql/8.4/main/pg_hba.conf (1 row) Moreover, is there anyway to view content of this file from stored in above

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-02 Thread Alvaro Herrera
Tim Bruce - Postgres escribió: On Tue, February 2, 2010 08:23, Alvaro Herrera wrote: Probably pg_read_file(): select pg_read_file('pg_hba.conf', 0, 8192); Note that pg_read_file only allows paths relative to $PGDATA, which is what you get from SHOW data_directory; Since the

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-02 Thread Joshua D. Drake
On Tue, 2010-02-02 at 16:09 -0300, Alvaro Herrera wrote: Tim Bruce - Postgres escribió: On Tue, February 2, 2010 08:23, Alvaro Herrera wrote: Probably pg_read_file(): select pg_read_file('pg_hba.conf', 0, 8192); Note that pg_read_file only allows paths relative to $PGDATA,

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-02 Thread Alvaro Herrera
Joshua D. Drake escribió: On Tue, 2010-02-02 at 16:09 -0300, Alvaro Herrera wrote: Tim Bruce - Postgres escribió: On Tue, February 2, 2010 08:23, Alvaro Herrera wrote: Probably pg_read_file(): select pg_read_file('pg_hba.conf', 0, 8192); Note that pg_read_file only

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-02 Thread dipti shah
I am connected to database as postgres user. '\!exec ..' doesn't work if I connect to the database from other host but it does work if I connect to the database from server where I have PostGreSQL installed. pg_read_file doesn't work in any case. Techdb=# \! exec cat

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-02 Thread John R Pierce
dipti shah wrote: I am connected to database as postgres user. '\!exec ..' doesn't work if I connect to the database from other host but it does work if I connect to the database from server where I have PostGreSQL installed. pg_read_file doesn't work in any case. Techdb=# \! exec cat

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-02 Thread dipti shah
That makes sense. Thanks, Dipti On Wed, Feb 3, 2010 at 12:08 PM, John R Pierce pie...@hogranch.com wrote: dipti shah wrote: I am connected to database as postgres user. '\!exec ..' doesn't work if I connect to the database from other host but it does work if I connect to the database from

[GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-01 Thread dipti shah
Hi, we have latest PostGreSQL setup and it allows everyone to connect. When I do \du, it gives following output and it is same for all users. TechDB=# \du List of roles Role name | Superuser | Create role | Create DB | Connections | Member of

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-01 Thread Richard Huxton
On 01/02/10 07:35, dipti shah wrote: Moreover, anyone can connect to databases as postgres user without giving password. I am not aware how above setup has been made but I want to get rid of them. Could anyone please help me in below questions? You'll want to read Chapter 19 of the manuals

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-01 Thread dipti shah
Thanks Richard. those chapters are very useful. I got to know most of concepts but didn't find the location of pg_hba.conf file so that I can verify it. I have connected to my database using postgres user. Could you tell me how to open pg_hba.conf file? Thanks. On Mon, Feb 1, 2010 at 3:06 PM,

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-01 Thread Richard Huxton
On 01/02/10 10:24, dipti shah wrote: Thanks Richard. those chapters are very useful. I got to know most of concepts but didn't find the location of pg_hba.conf file so that I can verify it. I have connected to my database using postgres user. Could you tell me how to open pg_hba.conf file? It

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-01 Thread Alvaro Herrera
dipti shah escribió: Thanks Richard. those chapters are very useful. I got to know most of concepts but didn't find the location of pg_hba.conf file so that I can verify it. I have connected to my database using postgres user. Could you tell me how to open pg_hba.conf file? Run this: