Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use existing GID in sequoia migration script #11433

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

abathur
Copy link
Member

@abathur abathur commented Sep 5, 2024

Motivation

I hardcoded the wrong GID (30001 instead of 30000), but it's better to just pick up the GID from the existing group.

cc @tomberek

Context

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

I hardcoded the wrong GID (30001 instead of 30000), but it's
better to just pick up the GID from the existing group.
@tomberek
Copy link
Contributor

tomberek commented Sep 5, 2024

I believe -create will not change an existing user's Primary GID. It may require a -change call.

@abathur
Copy link
Member Author

abathur commented Sep 5, 2024

In this case, the function's just running to re-create the missing _nixbldN users clobbered by the update.

That said, though, we have been tending to use -create (over -change) since we've generally observed it to be ~idempotent as long as we aren't trying to do something like change the UID to one that's already taken:

$ sudo /usr/bin/dscl . -read "/Users/_nixbld1" "PrimaryGroupID"
PrimaryGroupID: 350

$ sudo /usr/bin/dscl . -create "/Users/_nixbld1" "PrimaryGroupID" "351"

$ sudo /usr/bin/dscl . -read "/Users/_nixbld1" "PrimaryGroupID"
PrimaryGroupID: 351

Copy link
Contributor

@tomberek tomberek left a comment

Choose a reason for hiding this comment

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

I was wrong... this should update the users. Thanks!

@tomberek tomberek merged commit 5bfe198 into NixOS:master Sep 5, 2024
11 checks passed
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