fix pg_hba.conf generation as non-root
minor code unification