Upon request of Marc Haber, I'm attaching the latest version of the patch for this feature I had implemented more than twelve years ago and maintained for all the adduser versions that followed.
Documentation is missing, so here are the relevant bits:
=======================================================================
To enable this feature, you need to define a variable UID_POOL (for
user IDs) and/or GID_POOL (for group IDs) in F<adduser.conf>. The value
is either a file or a directory, in the latter case all files named
F<*.conf> in that directory are considered.
The file format is inspired by F</etc/passwd>: Text lines,
records separated by a colon. The values are
* user name/group name (mandatory)
* user ID/group ID (mandatory)
* gecos field (optional, useful for user IDs only)
* home directory (ditto)
* shell (ditto)
It is possible to use the same file/directory for UID_POOL and GID_POOL.
=======================================================================
If you want to include that, I'll be happy to provide more explanation
if needed.
The coding style might be a bit outdated, I tried to follow the style
adduser had in 2009.
My personal preference for the pool variables is.
UID_POOL=/etc/adduser-pool.d/
GID_POOL=/etc/adduser-pool.d/
Cheers,
Christoph
signature.asc
Description: PGP signature

