By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,586 Members | 1,121 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,586 IT Pros & Developers. It's quick & easy.

check for user validity

P: n/a
I know in advance all the information a user to start up a connection
to postgres and do queries. I would like to be able to check and see if
that user will be able to connect with his current crudentials. Is this
at all possible? If so, how?

thanks!
--
Alexander Cohen
http://www.toomuchspace.com
(819) 348-9237
(819) 432-3443
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 22 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
On Thu, Feb 26, 2004 at 22:17:14 -0500,
Alexander Cohen <al**@toomuchspace.com> wrote:
I know in advance all the information a user to start up a connection
to postgres and do queries. I would like to be able to check and see if
that user will be able to connect with his current crudentials. Is this
at all possible? If so, how?


Try to connect to the database as them and see whether or not the
connection is successful.

To do this in general without trying to connect you will need to have knowledge
about the contents of pg_hba.cong and pg_ident.conf. If you know that they
will have access to the database and the application is running as a
postgres superuser, you can check a username and password by looking at
pg_shadow.

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.