<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">The PowerShell script I use to provision new users adds them to an Active Directory group for HPC, ssh-es to the management node to do the sacctmgr
 changes, and emails the user. Never had it fail, and I've looped over entire class sections in PowerShell. Granted, there are some inherent delays due to the non-sacctmgr tasks, but it's on the order of seconds per user rather than minutes.</span></div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> slurm-users <slurm-users-bounces@lists.schedmd.com> on behalf of Jason Simms <simmsj@lafayette.edu><br>
<b>Sent:</b> Tuesday, August 18, 2020 10:36 AM<br>
<b>To:</b> Slurm User Community List <slurm-users@lists.schedmd.com><br>
<b>Subject:</b> [slurm-users] Adding Users to Slurm's Database</font>
<div> </div>
<div><span style="background: var(--white); text-align: center;">Hello everyone! We have a script that queries our LDAP server for any users that have an entitlement to use the cluster, and if they don't already have an account on the cluster, one is created
 for them. In addition, they need to be added to the Slurm database (in order to track usage, FairShare, etc.).</span></div>
</div>
<div>
<div>
<div dir="ltr">
<div><br>
</div>
<div>I've been doing this manually with a command like this:</div>
<div><br>
</div>
<div>sacctmgr add user <username> Account=root DefaultAccount=root</div>
<div><br>
</div>
<div>I would like to add that command to the user creation script, but I'm warned off by the Slurm docs that say never to call sacctmgr in a script/loop. I understand the reasons why doing so multiple times in rapid succession can be a bad idea. In our case,
 however, it would be rare to have more than one new user at a time (our script runs in 15-min. intervals). Is there really a concern in a case like ours?</div>
<div><br>
</div>
<div>How do you all handle adding users to Slurm's DB? Manually? Or, if not by script or some automated means...??</div>
<div><br>
</div>
<div>Warmest regards,</div>
<div>Jason<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="x_gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div style="color:rgb(0,0,0); font-family:Helvetica; font-size:14px; margin:0px">
<span style="color:rgb(130,36,51)"><font face="Century Gothic"><b>Jason L. Simms, Ph.D., M.P.H.</b></font></span></div>
<div style="color:rgb(0,0,0); font-family:Helvetica; font-size:14px; margin:0px">
<font face="Century Gothic"><span>Manager of Research and High-Performance Computing</span></font></div>
<div style="color:rgb(0,0,0); font-family:Helvetica; font-size:14px; margin:0px">
<font face="Century Gothic"><span>XSEDE Campus Champion<br>
</span><span style="color:gray">Lafayette College<br>
Information Technology Services<br>
710 Sullivan Rd | Easton, PA 18042<br>
Office: 112 Skillman Library<br>
p: (610) 330-5632</span></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>