Re: How to debug: password authentication failed for user
От | Tom Lane |
---|---|
Тема | Re: How to debug: password authentication failed for user |
Дата | |
Msg-id | 2602739.1740681158@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: How to debug: password authentication failed for user (Adrian Klaver <adrian.klaver@aklaver.com>) |
Ответы |
Re: How to debug: password authentication failed for user
|
Список | pgsql-general |
Adrian Klaver <adrian.klaver@aklaver.com> writes: > My guess it has to do with: > -c 'ALTER USER timeshift_user PASSWORD '"'"'timeshift_pass'"'"';' > I am still trying to work out what that quoting is doing? That makes my head hurt, too. Using log_statement to see what's actually getting sent to the server, I can see that as given it looks to be fine --- but if you put a shell variable in for the password as per the original intention, it's not expanded. I think what you need is -c 'ALTER USER timeshift_user PASSWORD '"'$PASSWORD'"';' Note this will fall over with potential for SQL injection if there's a single quote in the password, so better not use it with untrusted input. On the whole I'd say "find some other way to do that". regards, tom lane
В списке pgsql-general по дате отправления: