Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.postgresql > #111

Re: Using dblink and dblink-connect-u

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!texta.sil.at!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail
From "Laurenz Albe" <invite@spam.to.invalid>
Newsgroups comp.databases.postgresql
References <hgolp65cqdd4j8ajhuailicvpp48ekpias@4ax.com>
Subject Re: Using dblink and dblink-connect-u
Date Tue, 3 May 2011 10:18:53 +0200
X-Priority 3
X-MSMail-Priority Normal
X-Newsreader Microsoft Outlook Express 6.00.2900.5931
X-RFC2646 Format=Flowed; Original
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.6090
Organization dienste.wien.at ISP
Message-ID <1304410755.840860@proxy.dienste.wien.at> (permalink)
X-Cache nntpcache 2.3.3 (see http://www.nntpcache.org/)
Lines 34
NNTP-Posting-Host 141.203.254.23
X-Trace 1304410757 aconews.univie.ac.at 71616 141.203.254.23
X-Complaints-To abuse@univie.ac.at
Xref x330-a1.tempe.blueboxinc.net comp.databases.postgresql:111

Show key headers only | View raw


gargoyle60 wrote:
> I have been looking at connecing to remote databases (all my databases are on the same machine at
> localhost).
>
[...]
>
> I am trying to develop a backup strategy and I want to execute a number of simple SELECT queries
> from the main postgres superuser account to acquire certain information before running backups.
> However, all of my databases have passwords and obviously I don't want to have to specify passwords
> in scripts if I can avoid it.
> So, is there a way to temporarily remove (then reinstate) server password authentication when
> running as postgres?

To answer your last question, if you are user postgres and the database cluster
is local, you can modify pg_hba.conf to "trust" authentication and run "pg_ctl reload".

I don't know what your security concerns are, but temporarily relaxing
authentication checks does not seem such a good idea to me.

Does anybody who is *not* the DBA have shell access to the postgres
account on the server machine? If yes, you are in trouble anyway.
If no, you could consider adding a permanent entry to pg_hba.conf that
allows user postgres to connect *locally* without password, like

local   postgres    mydb                              trust
host    postgres    mydb        127.0.0.1/32          trust

That way you don't have to worry about passwords in administrative
scripts.

Yours,
Laurenz Albe 

Back to comp.databases.postgresql | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Using dblink and dblink-connect-u gargoyle60 <gargoyle60@example.invalid> - 2011-04-05 10:35 +0100
  Re: Using dblink and dblink-connect-u "Laurenz Albe" <invite@spam.to.invalid> - 2011-05-03 10:18 +0200
    Re: Using dblink and dblink-connect-u gargoyle60 <gargoyle60@example.invalid> - 2011-05-03 20:39 +0100

csiph-web