From 21c6d1b159d7b477e6e111298d0ee36fa89de5d1 Mon Sep 17 00:00:00 2001 From: madtibo Date: Wed, 24 Jul 2019 16:11:07 +0200 Subject: [PATCH] change PostgreSQL -password' authentication to 'md5' --- data/helpers.d/postgresql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/helpers.d/postgresql b/data/helpers.d/postgresql index a76580b11..d252ae2dc 100644 --- a/data/helpers.d/postgresql +++ b/data/helpers.d/postgresql @@ -283,11 +283,11 @@ ynh_psql_test_if_first_run() { sudo --login --user=postgres psql -c"ALTER user postgres WITH PASSWORD '$psql_root_password'" postgres - # force all user to connect to local database using passwords + # force all user to connect to local databases using hashed passwords # https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html#EXAMPLE-PG-HBA.CONF # Note: we can't use peer since YunoHost create users with nologin # See: https://github.com/YunoHost/yunohost/blob/unstable/data/helpers.d/user - ynh_replace_string --match_string="local\(\s*\)all\(\s*\)all\(\s*\)peer" --replace_string="local\1all\2all\3password" --target_file="$pg_hba" + ynh_replace_string --match_string="local\(\s*\)all\(\s*\)all\(\s*\)peer" --replace_string="local\1all\2all\3md5" --target_file="$pg_hba" # Advertise service in admin panel yunohost service add postgresql --log "$logfile"