![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have switched identification method from 'trust' to 'md5' for all local requests, ie: - local all all trust + local all all md5 |
|
But that creates a problem: - when restarting postgresql it waits for password; how can I work it around? My target is that pgsql restarts (or starst with system init) properly without need of entering password but every connection should require it. |
|
If there is no password requirement within local system, than every user could do createdb -d dbname -U postgres and create a database.. If I am mistaken, please point it out. |
#3
| |||
| |||
|
|
- local all all trust + local all postgres trust + local all all md5 Ok. but if user does: |
#4
| |||
| |||
|
|
Martin Atukunda wrote: - local all all trust + local all postgres trust + local all all md5 Ok. but if user does: psql -d template1 -U postgres? then he won't be asked about password but should. Everyone who can access psql, can get into db as postgres user. Not safe I suppose. |
#5
| |||
| |||
|
|
Martin Atukunda wrote: - local all all trust + local all postgres trust + local all all md5 Ok. but if user does: psql -d template1 -U postgres? then he won't be asked about password but should. Everyone who can access psql, can get into db as postgres user. Not safe I suppose. |
#6
| |||
| |||
|
|
- local all all trust + local all all md5 and then have init the postmaster by using su. I've written a startup script for my Slackware that does that. |

#7
| |||
| |||
|
|
I have switched identification method from 'trust' to 'md5' for all local requests, ie: - local all all trust + local all all md5 But that creates a problem: - when restarting postgresql it waits for password; how can I work it around? |
#8
| |||
| |||
|
|
I concur with the suggestion to investigate local IDENT auth, though. If your system supports it, it's trustworthy and lots more convenient than forcing a password to be supplied all the time. |
|
Another possibility is to put the correct password into the postgres account's ~/.pgpass file. If you stick with md5 local auth you are going to end up doing that anyway, because it's the only reasonable way to handle authentication for batch jobs (think about backup and periodic vacuum tasks). I am not totally sure, but I think that would also fix the pg_ctl start problem without needing -w. pg_ctl has two options: |
#9
| |||
| |||
|
|
Another possibility is to put the correct password into the postgres account's ~/.pgpass file. If you stick with md5 local auth you are |

#10
| |||
| |||
|
|
I've read developer docs about .pgpass file. Does it support already md5 encoded passwords? |
![]() |
| Thread Tools | |
| Display Modes | |
| |