[slurm-users] Changing DefaultAccount for user
Loris Bennett
loris.bennett at fu-berlin.de
Tue Nov 23 14:07:02 UTC 2021
Hi,
Thanks everyone. What I was missing was that that the two user/account
associations have to exist before I can change the default account.
However, what I find a bit odd is that I have multiple associations,
e.g.
$ sacctmgr show assoc where user=loris
Cluster Account User ...
---------- ---------- ---------- ...
bigiron boblab loris ...
bigiron staff loris ...
bigiron sc loris ...
the following shows only one, namely the default:
$ sacctmgr show user loris accounts
User Def Acct Admin
---------- ---------- ---------
loris staff None
If I then do
$ sacctmgr show assoc where user=loris format=account,defaultaccount
Account Def Acct
---------- ----------
boblab
staff
sc
I see all the accounts but not the default.
Is there a way to see all the accounts and which one is the default with
a single command?
Cheers,
Loris
Sean McGrath <smcgrat at tchpc.tcd.ie> writes:
> Hi Loris,
>
> Not sure if this helps you, sorry if not. I can't answer the specifics
> of your query about how sacctmgr works.
>
> Here are the relevant bits from our account setup workflow to add a
> users account to an account, the first line, then set their default
> account to it.
>
> sbank project useradd -c $cluster -a $project_code -u $user
> sacctmgr -i update users cluster=$cluster set defaultaccount=$project_code where user=$user,cluster=$cluster
>
> I've used the `sacctmgr -i update ...` step to change the default
> account for users subsequently after accounts have been created.
>
> Hope that helps, sorry if not.
>
> Sean
>
>
> On Tue, Nov 23, 2021 at 01:50:01PM +0100, 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?
>>
>> Cheers,
>>
>> Loris
>>
>> --
>> Dr. Loris Bennett (Herr/Mr)
>> ZEDAT, Freie Universität Berlin Email loris.bennett at fu-berlin.de
>>
--
Dr. Loris Bennett (Herr/Mr)
ZEDAT, Freie Universität Berlin Email loris.bennett at fu-berlin.de
More information about the slurm-users
mailing list