Subject: bug#40652: #36924 way solves the problem for me

From: Ludovic Courtès <[email-masked]>
Date: Thu, 16 Apr 2020 23:03:02 +0200

Guillaume Le Vaillant <[email-masked]> skribis:

> Guillaume Le Vaillant <[email-masked]> skribis:
>
>> Ludovic Courtès <[email-masked]> skribis:
>>
>>> Hi Guillaume,
>>>
>>> Guillaume Le Vaillant <[email-masked]> skribis:
>>>
>>>> I don't know if it's related, but recently I had GDM crashes at boot
>>>> after reconfiguring a system using gdm-service-type (generation n) to
>>>> make it use slim-service-type instead (generation n+1), and then
>>>> reconfiguring to gdm-service-type again (generation n+2).
>>>>
>>>> The problem was that the 'gdm' user id number (or group id number) was
>>>> not the same in generations n and n+2, which prevented GDM from
>>>> accessing the '/var/lib/gdm' directory.
>>>
>>> When did that happen?
>>>
>>> Commit a43e9157ef479e94c19951cc9d228cf153bf78ee (Sep. 2019) supposedly
>>> ensures that /var/lib/gdm has proper ownership.
>>>
>>> Thanks,
>>> Ludo’.
>>
>> I think it was around 2 weeks ago.
>
> Concerning the service extensions of gdm-service-type, is it guaranteed
> that %gdm-activation will be run after %gdm-accounts and not before?
> If it's not the case it could explain the problem...

‘%gdm-activation’ would throw an exception if the “gdm” user didn’t
exist, so apparently it’s run before the activation snippet of
‘account-service-type’ (the ordering guarantee is not explicit.)

Hmm I wonder what I’m missing then.  Would you like to try again?

Now, I think we should generalize this chown thing and apply it to all
the user accounts.  ‘user-homes’ would chown recursively if needed or
use the newfangled shiftfs, like systemd-homed does¹.

Thoughts?

Ludo’.

¹ https://systemd.io/HOME_DIRECTORY/