Permalink
Browse files

Enhance PostgreSQL security

Provide more secure defaults for Host Based Access (pg_hba.conf).

 - Use ident in lieu of trust for shell access

 - Use md5 in lieu of trust for epgsql access
  • Loading branch information...
AlainODea committed Jan 26, 2012
1 parent 698a43a commit e6c78c670b8ef8cda7ff6ed610cee1ee633b487f
Showing with 3 additions and 3 deletions.
  1. +3 −3 zotonic_install
View
@@ -15,9 +15,9 @@ CREATE DATABASE zotonic WITH OWNER = zotonic ENCODING = 'UTF8';
\c zotonic
CREATE LANGUAGE \"plpgsql\";" | su -l postgres -c psql && \
echo "# Zotonic settings
-local all zotonic trust
-host all zotonic 127.0.0.1/32 trust
-host all zotonic ::1/128 trust" >> /etc/postgresql/8.4/main/pg_hba.conf && \
+local all zotonic ident
+host all zotonic 127.0.0.1/32 md5
+host all zotonic ::1/128 md5" >> /etc/postgresql/8.4/main/pg_hba.conf && \
/etc/init.d/postgresql reload && \
mkdir /home/zotonic &&\

0 comments on commit e6c78c6

Please sign in to comment.