busybox: not possible to permanently remove klogd user
Commit b870258c (main/busybox: run klogd as klogd user and not root) introduced a user named klogd
that is created from busybox install script. A consequence of this is that users who don't want this user on their system can not remove it without it gets recreated on next busybox upgrade. And since it is not really possible to uninstall busybox, it means that it is not really possible to permanently remove the klogd
user.
Possible solutions:
- Move the
klogd
user to default/etc/passwd
provided byalpine-baselayout
. Users can simplydeluser klogd
, and it will not automatically come back on upgrades. This is the solution I prefer. It is very simple, and the drawback is insignificant (klogd
user is there by default even if you never installbusybox-openrc
). - Move the user creation to
busybox-openrc.pre-install
. Users can avoid creating theklogd
user withapk add !busybox-openrc
and not use any of the busybox provided services. There should be alternatives to those, but in this case you cannot use any of the busybox provided services. - Split
busybox-openrc
, and ship every service in a separate package. Theklogd
user would be created withbusybox-klogd-openrc
package. I really don't want to do this, because it adds a lot complexity with high risk of unexpected breakages and it has very low benefit. - let the install script parse some config where you can disable creation. For example, source
/etc/conf.d/klogd
and see ifcommand_user=klogd