-Set up the dak user on both the system and in postgres:
-# sudo adduser --system dak
-# sudo addgroup ftpmaster
-# sudo addgroup dak ftpmaster
-# sudo -u postgres createuser -s dak
+Set up the dak user:
+# sudo addgroup --system ftpmaster
+# sudo adduser --system dak --ingroup ftpmaster --shell /bin/bash
+
+Create postgres roles and database:
+# sudo -u postgres psql
+ CREATE USER dak CREATEROLE;
+ CREATE ROLE ftpmaster;
+ CREATE ROLE ftpteam WITH ROLE ftpmaster;
+ CREATE ROLE ftptrainee WITH ROLE ftpmaster, ftpteam;
+
+ CREATE DATABASE projectb WITH OWNER dak TEMPLATE template0 ENCODING 'SQL_ASCII';
+ \c projectb
+ CREATE EXTENSION IF NOT EXISTS plpgsql;
+ CREATE EXTENSION IF NOT EXISTS debversion;