Need linux uid in pg-psql
Need linux uid in pg-psql
От:
"Gauthier, Dave" <dave.gauthier@intel.com>
Дата:
Is there a way to get the linux idsid of a user, even for a remote network connection?
If not, is there a way to capture this somehow when the original connection is made and maybe stuff it in a temp table or something using whatever means (a trigger-like mechanism? ) ? Is there a script/function that gets run whenever a connection is made, something I might have access to, in which I could piggy-back something like this? What I'm talking about is basically grabbing and storing $USER for me to read later on with a stored proc.
I could write a pg-perlu to get this, but I suspect it won't give me the original user when there's a remote connect.
Thanks for any suggestions !
Re: Need linux uid in pg-psql
От:
Alan Hodgson <ahodgson@simkin.ca>
Дата:
On August 19, 2011 07:01:33 AM Gauthier, Dave wrote: > Is there a way to get the linux idsid of a user, even for a remote network > connection? > > I could write a pg-perlu to get this, but I suspect it won't give me the > original user when there's a remote connect. > > Thanks for any suggestions ! There's an identd protocol for this. It's not commonly used anymore, and when present tends to deliberately obscure the results.
Re: Need linux uid in pg-psql
От:
Chris Travers <chris.travers@gmail.com>
Дата:
On Fri, Aug 19, 2011 at 8:40 AM, Alan Hodgson wrote: > On August 19, 2011 07:01:33 AM Gauthier, Dave wrote: >> Is there a way to get the linux idsid of a user, even for a remote network >> connection? >> >> I could write a pg-perlu to get this, but I suspect it won't give me the >> original user when there's a remote connect. >> >> Thanks for any suggestions ! > > There's an identd protocol for this. It's not commonly used anymore, and when > present tends to deliberately obscure the results. > Couldn't you use client ssl certs for authentication and encode the data there in the cert? Best Wishes, Chris Travers
Re: Need linux uid in pg-psql
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Alan Hodgson writes: > On August 19, 2011 07:01:33 AM Gauthier, Dave wrote: >> Is there a way to get the linux idsid of a user, even for a remote network >> connection? > There's an identd protocol for this. It's not commonly used anymore, and when > present tends to deliberately obscure the results. Not to mention that it's trivially faked, if the user has root on his own machine. regards, tom lane
Re: Need linux uid in pg-psql
От:
"Gauthier, Dave" <dave.gauthier@intel.com>
Дата:
Not too worried about nefarious id faking in this environment. How does one use "identd" in an unobscured way? -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Tom Lane Sent: Friday, August 19, 2011 11:55 AM To: Alan Hodgson Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Need linux uid in pg-psql Alan Hodgson writes: > On August 19, 2011 07:01:33 AM Gauthier, Dave wrote: >> Is there a way to get the linux idsid of a user, even for a remote network >> connection? > There's an identd protocol for this. It's not commonly used anymore, and when > present tends to deliberately obscure the results. Not to mention that it's trivially faked, if the user has root on his own machine. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: Need linux uid in pg-psql
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Gauthier, Dave" writes: > Not too worried about nefarious id faking in this environment. > How does one use "identd" in an unobscured way? There's a command-line switch for the identd daemon, on most machines, that tells it whether to send hashed or plaintext responses. regards, tom lane