Hi Loris,

First you add the user to one or more other Slurm accounts, something like this:

$ sacctmgr add user xxx account=yyy

Then you can redefine the user's default account:

$ sacctmgr modify user where name=xxx set defaultaccount=yyy

Here is an example from our cluster where the user is in two accounts:

$ sacctmgr -rp show user WithAssoc xxx
User|Def Acct|Admin|Cluster|Account|Partition|Share|Priority|MaxJobs|MaxNodes|MaxCPUs|MaxSubmit|MaxWall|MaxCPUMins|QOS|Def QOS|
xxx|camdvip|None|niflheim|camdcmr||5|||||1000|||high,normal|normal|
xxx|camdvip|None|niflheim|camdvip||5||500|||1000|||high,normal|normal|

I hope this helps.

/Ole

On 11/23/21 13:50, Loris Bennett wrote:
Hi,

Occasionally I need to change a default account and I struggle every
time, possibly because my expectations are incorrect.

However the messages and the manpage seem to me unhelpful:

   $ sacctmgr show user alice accounts
         User   Def Acct     Admin
   ---------- ---------- ---------
        alice   boblab        None

   $ sacctmgr add user user=alice defaultaccount=carollab cluster=bigiron
    Nothing new added.

   $ sacctmgr show user alice accounts
         User   Def Acct     Admin
   ---------- ---------- ---------
        alice   boblab        None

What does "Nothing new added" mean?

In the manpage for sacctmgr it says:

   DefaultAccount=
       System wide default account name
       Must be defined on the first occurrence of the user.

I find the third line unclear, but I assume it means

       Must be specified when the user is created (and cannot be modified
       subsequently)

Deleting the user and recreating with the desired defaultaccount is the
only way I have managed change the default account.

Is this really the only way to achieve this?

Reply via email to