Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.postgresql > #111
| From | "Laurenz Albe" <invite@spam.to.invalid> |
|---|---|
| Newsgroups | comp.databases.postgresql |
| References | <hgolp65cqdd4j8ajhuailicvpp48ekpias@4ax.com> |
| Subject | Re: Using dblink and dblink-connect-u |
| Date | 2011-05-03 10:18 +0200 |
| Organization | dienste.wien.at ISP |
| Message-ID | <1304410755.840860@proxy.dienste.wien.at> (permalink) |
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 | Next — Previous in thread | Next in thread | Find similar
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