Skip to content

Make normal ID allocation range configurable (normalIdRange) - #61

Open
Mic92 wants to merge 1 commit into
nikstur:mainfrom
Mic92:normal-id-range
Open

Mic92 wants to merge 1 commit into
nikstur:mainfrom
Mic92:normal-id-range

Conversation

@Mic92

@Mic92 Mic92 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Stacked on #60.

Adds a top-level normalIdRange config field (default 1000-29999) controlling the range for dynamically allocated normal user/group IDs, so statically assigned IDs (e.g. for NFS) can be kept outside of it. System IDs stay at 1-999.

@Mic92

Mic92 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

This helps when people add static uids after the fact since it gives a save range that won't be used by userborn ever.

@nikstur nikstur left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This generally makes sense but it cannot be wired up in Nixpkgs right now because there is no option for it.

Comment thread rust/userborn/src/id.rs Outdated
Comment thread rust/userborn/src/config.rs Outdated
Sites that assign static IDs out of band (e.g. for NFS) need a range
that userborn will never allocate from dynamically. login.defs already
models this as UID_MIN/UID_MAX and GID_MIN/GID_MAX, which nixpkgs
exposes via security.loginDefs.settings, so mirror that with separate
normalUidRange/normalGidRange fields that the NixOS module can pass
through directly.
Mic92 added a commit to TUM-DSE/nixpkgs that referenced this pull request Sep 13, 2026
…nges

Userborn ignored `expires`, so accounts past their expiration date could
still log in, unlike with the perl activation script. It also hardcoded
the dynamic allocation range instead of following
security.loginDefs.settings.{UID,GID}_{MIN,MAX}.

Bump to a fork carrying both upstream PRs until they are released:
- nikstur/userborn#72 (expires)
- nikstur/userborn#61 (normalUidRange/normalGidRange)
Mic92 added a commit to TUM-DSE/nixpkgs that referenced this pull request Sep 17, 2026
…nges

Userborn ignored `expires`, so accounts past their expiration date could
still log in, unlike with the perl activation script. It also hardcoded
the dynamic allocation range instead of following
security.loginDefs.settings.{UID,GID}_{MIN,MAX}.

Bump to a fork carrying both upstream PRs until they are released:
- nikstur/userborn#72 (expires)
- nikstur/userborn#61 (normalUidRange/normalGidRange)
Mic92 added a commit to TUM-DSE/nixpkgs that referenced this pull request Sep 22, 2026
…nges

Userborn ignored `expires`, so accounts past their expiration date could
still log in, unlike with the perl activation script. It also hardcoded
the dynamic allocation range instead of following
security.loginDefs.settings.{UID,GID}_{MIN,MAX}.

Bump to a fork carrying both upstream PRs until they are released:
- nikstur/userborn#72 (expires)
- nikstur/userborn#61 (normalUidRange/normalGidRange)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants