[Buildroot] [PATCH v2] package/openssh: Add sysusers.d snippet

Arnout Vandecappelle arnout at mind.be
Tue Dec 18 14:32:03 UTC 2018



On 18/12/2018 15:14, Chris Lesiak wrote:
> 
> On 12/18/18 1:49 AM, Thomas Petazzoni wrote:
>> Hello,
>>
>> On Mon, 17 Dec 2018 23:59:04 +0100, Arnout Vandecappelle wrote:
>>
>>>   Which brings me to my question to Chris: what was the purpose of this patch to
>>> begin with? Since OPENSSH_USERS is already set, the sshd user will already exist
>>> in /etc/passwd, so the sysusers.d directive will be ignored... Either that, or
>>> our mkusers script doesn't work correctly.
>> Stateless systems, where /etc and /var don't even "exist" in a
>> persistent fashion, and are entirely populated at boot time.
>>
>> Best regards,
>>
>> Thomas
> 
> 
> In my particular case, /etc is empty on first boot, but retains state 
> after that.  Even if I started with a populated /etc/passwd, when 
> updating /usr (switching in a new version to update the the OS), I might 
> have new services with associated users that I would like to have 
> automatically added to /etc/passwd.

 That's a very good motivation!

 So you're generating a rootfs with empty /etc? Do you need any other changes to
make that work? To support this use case, it would be nice if we could add an
option to the system menu that enables it (this would depend on systemd of
course), so that it can be used fo force packages to do whatever is needed to
support empty /etc. And then we can add a post-build check that /etc is really
empty at the end of the build, so that the autobuilders can detect problems.

 Regards,
 Arnout


More information about the buildroot mailing list