Re: Suggestion : support for environment variable in initdb to set the superuser password

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Suggestion : support for environment variable in initdb to set the superuser password
Дата
Msg-id e4de310d-ac45-4a51-9411-359c4f312cac@eisentraut.org
обсуждение исходный текст
Ответ на Suggestion : support for environment variable in initdb to set the superuser password  (Reda Agaoua <reda.agaoua@gmail.com>)
Ответы Re: Suggestion : support for environment variable in initdb to set the superuser password
Список pgsql-hackers
On 27.05.25 11:43, Reda Agaoua wrote:
> I do believe it can be useful in a variety of settings, but I'm not sure 
> whether this is secure. Specifically, the documentation advises against 
> using PGPASSWORD for connecting to postgres :
> 
> "Use of this environment variable is not recommended for security 
> reasons, as some operating systems allow non-root users to see process 
> environment variables via ps; instead consider using a password file 
> (see Section 32.16)." (32.15. Environment Variables)
> 
> In my opinion, the context for using PGPASSWORD (i.e. connecting to an 
> instance) is very different from that of initdb, where the password is 
> only used once during cluster initialization. So I think the security 
> concerns from section 32.16 may not necessarily apply here.

Well, insecure is insecure.  "Insecure, but it's ok because it's not 
used very often" is not a valid excuse.



В списке pgsql-hackers по дате отправления: