[LEDE-DEV] Stateless /etc/passwd, /etc/group, ...

Matthias-Christian Ott ott at mirix.org
Mon Dec 11 10:31:47 PST 2017


Recently I did a sysupgrade on an older OpenWRT system and upgraded it
to LEDE. I had the problem that there was no dnsmasq user because
/etc/passwd is in /lib/upgrade/keep.d/base-files-essential and
sysupgrade does not merge them. I thought a bit about how to improve this.

There is a NSS module called nss_altfiles [1] that allows to have a
secondary /etc/passwd, /etc/group and so on files at an alternative
location like /lib/passwd or /lib/group. OSTree also wants to store an
additional /etc/passwd in an alternative location [2]. systemd has
systemd-sysusers that is also used for stateless systems with systemd [3].

I wonder if LEDE could not have a similar mechanism. BusyBox and musl
could be easily changed to look in a secondary location and it should be
easy to mimic systemd-sysusers.

Matthias-Christian

[1] https://github.com/aperezdc/nss-altfiles
[2] https://ostree.readthedocs.io/en/latest/manual/adapting-existing/
[3] http://0pointer.de/blog/projects/stateless.html



More information about the Lede-dev mailing list