<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>So the Lua script I posted only does it for people who submit to
      the cluster.  To do it for all users it should just be a simple
      bash script to do that, I don't have one put together though.</p>
    <p>-Paul Edmon-<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 09/13/2018 10:29 AM, Eric F. Alemany
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:01475E6E-14B8-4ECD-B6BB-C8E10D9A8E78@stanford.edu">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      Hi Paul
      <div><br>
      </div>
      <div>You said </div>
      <div><br>
      </div>
      <div>“<span style="background-color: rgba(255, 255, 255, 0);">Another
          way would be to make all your Linux users and then map that in
          to Slurm using sacctmgr.”</span></div>
      <div><br>
      </div>
      <div>I am curious to know how you do that.</div>
      <div><br>
      </div>
      <div>Thank you</div>
      <div><br>
      </div>
      <div>Best</div>
      <div>Eric <br>
        <br>
        <div id="AppleMailSignature">
          <div style="direction: inherit;"><span style="text-align:
              -webkit-auto; background-color: rgba(255, 255, 255, 0);">._____________________________________________________________________________________________________</span></div>
          <div class="" style="text-align: -webkit-auto; orphans: 2;
            widows: 2; word-wrap: break-word; -webkit-nbsp-mode: space;
            -webkit-line-break: after-white-space;">
            <div class="" style="orphans: auto; widows: auto;"><span
                class="" style="background-color: rgba(255, 255, 255,
                0);"><br class="">
              </span></div>
            <span class="" style="background-color: rgba(255, 255, 255,
              0);"><b class="">
                <div class="" style="orphans: auto; widows: auto;"><b
                    class="" style="text-align: -webkit-auto;">Eric F.
                     Alemany</b></div>
              </b>
              <div class="" style="orphans: auto; widows: auto;"><i
                  class="" style="text-align: -webkit-auto;">System
                  Administrator for Research</i></div>
            </span>
            <div class="" style="orphans: auto; widows: auto;"><span
                class="" style="background-color: rgba(255, 255, 255,
                0);"><br class="">
              </span></div>
            <div class="" style="orphans: auto; widows: auto;"><span
                class="" style="text-align: -webkit-auto;
                background-color: rgba(255, 255, 255, 0);">Division of
                Radiation & Cancer  Biology</span></div>
            <div class="" style="orphans: auto; widows: auto;"><span
                class="" style="text-align: -webkit-auto;
                background-color: rgba(255, 255, 255, 0);">Department of
                Radiation Oncology</span></div>
            <div class="" style="orphans: auto; widows: auto;"><span
                class="" style="background-color: rgba(255, 255, 255,
                0);"><br class="">
              </span></div>
            <div class="" style="orphans: auto; widows: auto;"><span
                class="" style="text-align: -webkit-auto;
                background-color: rgba(255, 255, 255, 0);">Stanford
                University School of Medicine</span></div>
            <div class="" style="orphans: auto; widows: auto;"><span
                class="" style="text-align: -webkit-auto;
                background-color: rgba(255, 255, 255, 0);">Stanford,
                California 94305</span></div>
            <div class="" style="orphans: auto; widows: auto;"><span
                class="" style="background-color: rgba(255, 255, 255,
                0);"><br class="">
              </span></div>
            <div class="" style="orphans: auto; widows: auto;"><span
                class="" style="background-color: rgba(255, 255, 255,
                0);"><font class="" style="text-align: -webkit-auto;">Tel:</font><a
                  href="tel:1-650-498-7969" dir="ltr"
                  x-apple-data-detectors="true"
                  x-apple-data-detectors-type="telephone"
                  x-apple-data-detectors-result="1"
                  moz-do-not-send="true">1-650-498-7969</a><font
                  class="" style="text-align: -webkit-auto;">  No
                  Texting</font></span></div>
            <div class="" style="orphans: auto; widows: auto;"><span
                class="" style="background-color: rgba(255, 255, 255,
                0);"><font class="" style="text-align: -webkit-auto;">Fax:</font><a
                  href="tel:1-650-723-7382" dir="ltr"
                  x-apple-data-detectors="true"
                  x-apple-data-detectors-type="telephone"
                  x-apple-data-detectors-result="2"
                  moz-do-not-send="true">1-650-723-7382</a></span></div>
          </div>
        </div>
        <div><br>
          On Sep 13, 2018, at 01:09, Loris Bennett <<a
            href="mailto:loris.bennett@fu-berlin.de"
            moz-do-not-send="true">loris.bennett@fu-berlin.de</a>>
          wrote:<br>
          <br>
        </div>
        <blockquote type="cite">
          <div><span>Hi Paul,</span><br>
            <span></span><br>
            <span>I'd be interested in seeing your Lua submit script, if
              you're willing to</span><br>
            <span>share.</span><br>
            <span></span><br>
            <span>Until now I had thought that the most elegant way of
              setting up Slurm</span><br>
            <span>users would be via a PAM module analogous to
              pam_mkhomedir, the simplest</span><br>
            <span>option being to use pam_script.</span><br>
            <span></span><br>
            <span>However, given that we do have users who somehow never
              get round to</span><br>
            <span>submitting a job before their HPC access expires,
              setting up the Slurm</span><br>
            <span>account when the first job is submitted seems quite
              appealing.</span><br>
            <span></span><br>
            <span>Cheers,</span><br>
            <span></span><br>
            <span>Loris</span><br>
            <span></span><br>
            <span>Paul Edmon <<a href="mailto:pedmon@cfa.harvard.edu"
                moz-do-not-send="true">pedmon@cfa.harvard.edu</a>>
              writes:</span><br>
            <span></span><br>
            <blockquote type="cite"><span>So useradd is adding a Linux
                user, which sacctmgr creates a Slurm user.</span><br>
            </blockquote>
            <blockquote type="cite"><span></span><br>
            </blockquote>
            <blockquote type="cite"><span>What we do is that we run AD
                for our Linux user managment. We then in our job submit
                lua script look to see if the user has an account in
                slurm and if they don't we create it.</span><br>
            </blockquote>
            <blockquote type="cite"><span></span><br>
            </blockquote>
            <blockquote type="cite"><span>Another way would be to make
                all your Linux users and then map that in to Slurm using
                sacctmgr.</span><br>
            </blockquote>
            <blockquote type="cite"><span></span><br>
            </blockquote>
            <blockquote type="cite"><span>It really depends on if your
                Slurm users are a subset of your regular users or not.</span><br>
            </blockquote>
            <blockquote type="cite"><span></span><br>
            </blockquote>
            <blockquote type="cite"><span>-Paul Edmon-</span><br>
            </blockquote>
            <blockquote type="cite"><span></span><br>
            </blockquote>
            <blockquote type="cite"><span>On 9/12/2018 12:21 PM, Andre
                Torres wrote:</span><br>
            </blockquote>
            <blockquote type="cite"><span></span><br>
            </blockquote>
            <blockquote type="cite"><span>Hi all,</span><br>
            </blockquote>
            <blockquote type="cite"><span></span><br>
            </blockquote>
            <blockquote type="cite"><span>I’m new to slurm and I’m
                confused regarding user creation. I have an installation
                with 1 login node and 5 compute nodes. If I create a
                user across all the nodes with the same uid and gid I
                can execute jobs but</span><br>
            </blockquote>
            <blockquote type="cite"><span>I can’t understand the
                difference between user creation with “useradd” command
                and the “sacctmgr” command
              </span><br>
            </blockquote>
            <blockquote type="cite"><span></span><br>
            </blockquote>
            <blockquote type="cite"><span>sacctmgr create account
                name=test</span><br>
            </blockquote>
            <blockquote type="cite"><span></span><br>
            </blockquote>
            <blockquote type="cite"><span>sacctmgr create user jdoe
                account=test</span><br>
            </blockquote>
            <blockquote type="cite"><span></span><br>
            </blockquote>
            <blockquote type="cite"><span>Also, is there anyway of
                creating a user at login node and replicate to the
                compute nodes ? What is the best practice for user
                creation ?</span><br>
            </blockquote>
            <blockquote type="cite"><span></span><br>
            </blockquote>
            <blockquote type="cite"><span>Thanks in advance</span><br>
            </blockquote>
            <blockquote type="cite"><span></span><br>
            </blockquote>
            <blockquote type="cite"><span></span><br>
            </blockquote>
            <span>-- </span><br>
            <span>Dr. Loris Bennett (Mr.)</span><br>
            <span>ZEDAT, Freie Universität Berlin         Email <a
                href="mailto:loris.bennett@fu-berlin.de"
                moz-do-not-send="true">
                loris.bennett@fu-berlin.de</a></span><br>
            <span></span><br>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>