From e3587ebc8c6eef1c41b662552b186d38d92de94d Mon Sep 17 00:00:00 2001
From: Sinisa Veseli <sveseli@aps.anl.gov>
Date: Tue, 30 Jun 2015 18:42:46 +0000
Subject: [PATCH] add system user to the db for development

---
 sbin/dm_prepare_dev_config.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sbin/dm_prepare_dev_config.sh b/sbin/dm_prepare_dev_config.sh
index eafff5c5..f363f8f3 100755
--- a/sbin/dm_prepare_dev_config.sh
+++ b/sbin/dm_prepare_dev_config.sh
@@ -65,6 +65,11 @@ if [ ! -f "$DM_SYSTEM_PASSWORD_FILE" ]; then
     stty $sttyOrig
     echo $DM_SYSTEM_PASSWORD > $DM_SYSTEM_PASSWORD_FILE
     chmod 600 $DM_SYSTEM_PASSWORD_FILE
+
+    # Add dm system user to the DB
+    echo "Adding $DM_SYSTEM_USER system user to the database"
+    dm-add-user --username=$DM_SYSTEM_USER --first-name=System --last-name=Account --password-file=$DM_SYSTEM_PASSWORD_FILE || exit 1
+    dm-add-user-system-role --username=$DM_SYSTEM_USER --role-name=Administrator || exit 1
 fi
 
 echo "Generating web service config files"
-- 
GitLab