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

Error when trying to create core users with empty uid #10948

Open
1 of 3 tasks
nkeneng opened this issue Jun 23, 2024 · 2 comments
Open
1 of 3 tasks

Error when trying to create core users with empty uid #10948

nkeneng opened this issue Jun 23, 2024 · 2 comments
Labels
installer macos Nix on macOS, aka OS X, aka darwin

Comments

@nkeneng
Copy link

nkeneng commented Jun 23, 2024

Platform

  • Linux:
  • macOS
  • WSL

Issue with Installing Nix Package Manager on macOS

When trying to install the Nix package manager, I encountered the following error:

It seems the build user _nixbld1 already exists, but with the UID
with the UID ''. This script can't really handle that right
now, so I'm going to give up.

The issue arose because the script used the condition if ! poly_user_exists "$username" ; then to check if the user existed. However, this condition returned an empty space in the terminal, which caused the script to incorrectly assume the user existed. Consequently, the next step attempted to retrieve the user ID, resulting in an empty string for the UID because no user ID was found.

To resolve this, I added an OR statement to check if the user ID for the username was empty. The modified condition was:

if ! poly_user_exists "$username" || [ -z "$(poly_user_id_get "$username")" ]; then

This fixed the issue, allowing the installation to proceed correctly.

@abathur
Copy link
Member

abathur commented Jun 23, 2024

Assuming you've taken the Sequoia update and already had Nix installed, I'm reasonably sure that dscl actually is reporting that the user exists, but that it also has no UID because the Sequoia update is clobbering them.

What's /usr/bin/dscl . -read "/Users/_nixbld1"; echo $? say?

See also:

@roberth roberth added the macos Nix on macOS, aka OS X, aka darwin label Jun 29, 2024
@cgardner
Copy link

cgardner commented Jul 1, 2024

I've been having the same issue. @abathur, here's my output from that command.

dsAttrTypeNative:accountPolicyData:
 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>creationTime</key>
	<real>1719873217.580508</real>
</dict>
</plist>

dsAttrTypeNative:record_daemon_version: 9040000
AppleMetaNodeLocation: /Local/Default
GeneratedUID: 03C81C89-50F2-4AF8-B033-959132CEC9B2
Password: ********
RecordName: _nixbld1
RecordType: dsRecTypeStandard:Users
0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installer macos Nix on macOS, aka OS X, aka darwin
Projects
None yet
Development

No branches or pull requests

4 participants