[systemd-devel] systemd-sysusers

Reindl Harald h.reindl at thelounge.net
Mon Feb 5 09:26:09 UTC 2018



Am 05.02.2018 um 06:56 schrieb Michael Chapman:
> On Mon, 5 Feb 2018, Johannes Ernst wrote:
>> It appears systemd-sysusers does not create home directories. On the 
>> other hand, it picks (largely unpredictable) UIDs from a range.
>>
>> So I have to run systemd-sysusers, and after that, find the UID of the 
>> user and chown the home directory? Or is there the equivalent of the 
>> “useradd -m” flag somewhere that I’m just not seeing?
> 
> systemd-sysusers is, as the name suggests, really for _system_ users, 
> and often those kinds of users don't have ordinary home directories -- 
> that is, ones the user can actually write to.
> 
> However, systemd-sysusers.service is ordered before 
> systemd-tmpfiles-setup.service at boot, so if you need to create a 
> system user's home directory and ensure its ownership is correct, you 
> could use a corresponding tmpfiles.d fragment to do so.

i hope you meant systemd-tmpfiles-setup.service is ordered before 
systemd-sysusers.service and you simply talked about "Before=" which in 
fact means ordered after



More information about the systemd-devel mailing list