PostgreSQL

Enable PostgreSQL 8+ remote access without password

cat >> $PGSQL_DATA/pg_hba.conf <<EOF
host all all 0/0 trust
EOF
sed -i "s|.*listen_addresses.*|listen_addresses = '*'|" $PGSQL_DATA/postgresql.conf
# Add following rule to iptables if needed.
iptables -A INPUT -p tcp --dport 5432 -j ACCEPT