Discussion:
Bug#1074121: sub{u,g}id creation
Add Reply
Chris Hofstaedtler
2024-06-23 12:00:01 UTC
Reply
Permalink
Package: passwd,base-passwd
X-Debbugs-CC: Helmut Grohne <***@subdivi.de>, Johannes Schauer Marin Rodrigues <***@debian.org>, ***@packages.debian.org, ***@packages.debian.org

Hi Colin et al,

A long time ago, Balint added code to login's postinst to create
/etc/subuid, /etc/subgid. This is necessary, because without the
files existing, useradd does not add entries to them.

However:

1) login is not essential anymore.

2) people want to use useradd from a 'host environment' (like
outside a chroot). In this case, passwd might also be absent.

I had the thought that base-passwd might be a better place to create
these files, but didn't want to introduce extra churn. Helmut
independently suggested a similar thought.

Colin, what do you think? Can/should base-passwd create /etc/subuid,
/etc/subgid on new installs and upgrades?

Best,
Chris
Chris Hofstaedtler
2024-06-23 14:00:02 UTC
Reply
Permalink
Post by Chris Hofstaedtler
Colin, what do you think? Can/should base-passwd create /etc/subuid,
/etc/subgid on new installs and upgrades?
Attached is a draft patch to do this in base-passwd. It is an
almost verbatim copy of what login.postinst did so far.

Thanks for considering,
Chris
Colin Watson
2024-06-24 10:30:01 UTC
Reply
Permalink
Post by Chris Hofstaedtler
A long time ago, Balint added code to login's postinst to create
/etc/subuid, /etc/subgid. This is necessary, because without the
files existing, useradd does not add entries to them.
1) login is not essential anymore.
2) people want to use useradd from a 'host environment' (like
outside a chroot). In this case, passwd might also be absent.
I had the thought that base-passwd might be a better place to create
these files, but didn't want to introduce extra churn. Helmut
independently suggested a similar thought.
Colin, what do you think? Can/should base-passwd create /etc/subuid,
/etc/subgid on new installs and upgrades?
I don't see any obvious problems with this. I'd like to allow a week or
so for comment, so I've told my task tracker to remind me about this
next week.
--
Colin Watson (he/him) [***@debian.org]
Loading...