diff --git a/slurm_agent.py b/slurm_agent.py
index ab7dcec9864c7fba9aa527add60e510fa7b37202..5ce3727c0cde324020a56ab5e4a929305dd88ef4 100755
--- a/slurm_agent.py
+++ b/slurm_agent.py
@@ -39,6 +39,7 @@ def slurm_account_create(ch, method, properties, body):
     username = msg['username']
     try:
         subprocess.call(["sudo", "sacctmgr", "add", "account", username, "-i",  "Descripition: Add user"])
+        subprocess.call(["sudo", "sacctmgr", "add", "user", username, "account="+username, "-i"])
         print("SLURM account for user {} has been added".format(username))
     except:
         print("Failed to create user")