From: | Vishal Arora <aroravishal22(at)hotmail(dot)com> |
---|---|
To: | Shashwat_Nigam <shashwat_nigam(at)satyam(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Regarding access to a user |
Date: | 2008-08-21 09:39:43 |
Message-ID: | BLU149-W14A01875370BACC7FC9AFA96B0@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-general pgsql-sql |
From: Shashwat_Nigam(at)satyam(dot)comTo: aroravishal22(at)hotmail(dot)com; pgsql-admin(at)postgresql(dot)orgCC: pgsql-general(at)postgresql(dot)org; pgsql-sql(at)postgresql(dot)org; pgsql-admin(at)postgresql(dot)orgDate: Thu, 21 Aug 2008 14:55:05 +0530Subject: Re: [ADMIN] Regarding access to a user
Hi Vishal
Ya you are right and the order is same and the command is like that only.
I am opening it through pgAdmin only..
If you are using pgAdmin, you have to keep maintainence db as postgres for which you do not have the entry for that in pg_hba file. I would suggest you to use psql -U <username> command line option to connect.
Thanks & Regards,
Shashwat Nigam
| Software Engineer | Geographical Information System
Satyam Computer Services Limited, Hyderabad | MOBILE: +919951467324 |
From: Vishal Arora [mailto:aroravishal22(at)hotmail(dot)com] Sent: Thursday, August 21, 2008 2:47 PMTo: Shashwat_Nigam; pgsql-admin(at)postgresql(dot)orgSubject: RE: [ADMIN] Regarding access to a user
Hi Shashwat, I presume your user is hmri and the database is hmri_database, is it correct? if yes - your pg_hba.conf entry should be as following (if you are connecting to postgres on the same machine)host hmri_database hmri 127.0.0.1/32 md5 Can you tell me what command are you using to connect to the server and what environment is it? Regards Vishal
From: Shashwat_Nigam(at)satyam(dot)comTo: aroravishal22(at)hotmail(dot)com; pgsql-admin(at)postgresql(dot)org; Kevin(dot)Grittner(at)wicourts(dot)govCC: pgsql-general(at)postgresql(dot)org; pgsql-sql(at)postgresql(dot)org; pgsql-admin(at)postgresql(dot)orgDate: Thu, 21 Aug 2008 14:35:43 +0530Subject: Re: [ADMIN] Regarding access to a user
Dear Vishal
Thanks for the help but by doing this an error is generated at the time when the user is trying to log in with the following message:
“
Access to database denied
The server doesn't grant access to the database: the server reports
FATAL: no pg_hba.conf entry for host "127.0.0.1", user "hmri", database "postgres", SSL off
To access a database on a PostgreSQL server, you first have to grant primary access to the server for your client (Host Based Authentication). PostgreSQL will check the pg_hba.conf file if a pattern that matches your client address / username / database is present and enabled before any SQL GRANT access control lists are evaluated.
The initial settings in pg_hba.conf are quite restrictive, in order to avoid unwanted security holes caused by unreviewed but mandatory system settings. You'll probably want to add something like
host all all 192.168.0.0/24 md5
This example grants MD5 encrypted password access to all databases to all users on the private network 192.168.0.0/24.
You can use the pg_hba.conf editor that is built into pgAdmin III to edit the pg_hba.conf configuration file. After changing pg_hba.conf, you need to trigger a server configuration reload using pg_ctl or by stopping and restarting the server process.
“
Please provide futher proceedings
Thanks & Regards,
Shashwat Nigam
| Software Engineer | Geographical Information System
Satyam Computer Services Limited, Hyderabad | MOBILE: +919951467324 |
From: Vishal Arora [mailto:aroravishal22(at)hotmail(dot)com] Sent: Thursday, August 21, 2008 2:29 PMTo: Shashwat_NigamCc: pgsql-admin(at)postgresql(dot)orgSubject: RE: [ADMIN] Regarding access to a user
> From: Shashwat_Nigam(at)satyam(dot)com> To: Kevin(dot)Grittner(at)wicourts(dot)gov> CC: pgsql-general(at)postgresql(dot)org; pgsql-sql(at)postgresql(dot)org; pgsql-admin(at)postgresql(dot)org> Date: Thu, 21 Aug 2008 14:23:51 +0530> Subject: Re: [ADMIN] Regarding access to a user> > Dear Kevin> Thanks for the help. But still the user is able to see all the databases. I defined something like this> > # IPv4 local connections:> host all all 127.0.0.1/32 md5> host HMRI_database hmri 127.0.0.1/32 md5You have to comment out the first entry made in your hba file. In this case it checks for the first line where all users are allowed to access all databases so it does not checks the second line. > > in the above case hmri is user and HMRI_database. But still when user is log in as 'hmri' it is able to access all the databases.> Please provide a solution for the same.> > Thanks & Regards,> Shashwat Nigam> | Software Engineer | Geographical Information System> Satyam Computer Services Limited, Hyderabad | MOBILE: +919951467324 |> > -----Original Message-----> From: Kevin Grittner [mailto:Kevin(dot)Grittner(at)wicourts(dot)gov]> Sent: Wednesday, August 20, 2008 6:41 PM> To: pgsql-admin(at)postgresql(dot)org; Shashwat_Nigam> Cc: pgsql-general(at)postgresql(dot)org; pgsql-sql(at)postgresql(dot)org> Subject: Re: [ADMIN] Regarding access to a user> > >>> Shashwat_Nigam <Shashwat_Nigam(at)satyam(dot)com> wrote:> > > Now what I want is to set privilege that whenever the user log in as> Us> > he can only see database Y, none other than that. The user Us could> have all> > rights for database Y but can't go for any other database (X or Z).> > The first thing you need to do is configure "host based> authentication":> > http://www.postgresql.org/docs/8.3/interactive/auth-pg-hba-conf.html> > Among other things, this allows you to restrict which users can> connect to which databases.> > -Kevin> > > DISCLAIMER:> This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.> > -- > Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)> To make changes to your subscription:> http://www.postgresql.org/mailpref/pgsql-admin
Search for videos of Bollywood, Hollywood, Mollywood and every other wood, only on Live.com Try it now!
DISCLAIMER:This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.
Searching for weekend getaways? Try Live.com Try it!
DISCLAIMER:This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.
_________________________________________________________________
Searching for the best deals on travel? Visit MSN Travel.
http://msn.coxandkings.co.in/cnk/cnk.do
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2008-08-21 12:03:44 | Re: [GENERAL] Regarding access to a user |
Previous Message | Shashwat_Nigam | 2008-08-21 09:25:05 | Re: Regarding access to a user |
From | Date | Subject | |
---|---|---|---|
Next Message | Tomasz Ostrowski | 2008-08-21 09:53:22 | Re: Interval Formatting -> Convert to timestamp |
Previous Message | Raymond O'Donnell | 2008-08-21 09:29:33 | Re: Interval Formatting -> Convert to timestamp |
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2008-08-21 12:03:44 | Re: [GENERAL] Regarding access to a user |
Previous Message | Shashwat_Nigam | 2008-08-21 09:25:05 | Re: Regarding access to a user |