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 Resolved
Comment thread rust/userborn/src/config.rs Resolved
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)
@r-vdp

r-vdp commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

I think we should merge this and have a new release that we can get into nixpkgs, and then we wire it up in the nixos module. Any reason not to merge this?

@r-vdp

r-vdp commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

I actually think that we should also have an option to configure the range for the system user ids, since currently they can clash with the static ids that we have in nixos (that are all <= 400).
@Mic92 would you want to add that and also rebase this PR to fix the conflicts?

Mic92 added a commit to TUM-DSE/nixpkgs that referenced this pull request Oct 15, 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 Oct 21, 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 Oct 24, 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 Nov 7, 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 Nov 11, 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 Nov 16, 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 Nov 19, 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.

3 participants