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

Darwin: install script fails on user with conflicting UniqueID (multi-user mode) #2179

Open
singles opened this issue May 25, 2018 · 3 comments
Labels

Comments

@singles
Copy link

singles commented May 25, 2018

Looks like install script doesn't check for UniqueID in multi-user mode

How to reproduce:

  1. Create a user with UniqueID 30005.
  2. Run curl https://nixos.org/nix/install | sh
  3. You will get
...
~~> Setting up the build user nixbld1
           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty
              Note:	Nix build user 1
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

... 

~~> Setting up the build user nixbld4
           Created:	Yes
            Hidden:	Yes
    Home Directory:	/var/empty
              Note:	Nix build user 4
   Logins Disabled:	Yes
  Member of nixbld:	Yes
    PrimaryGroupID:	30000

~~> Setting up the build user nixbld5
<main> attribute status: eDSRecordAlreadyExists
<dscl_cmd> DS Error: -14135 (eDSRecordAlreadyExists)

One might assume, that the problem lies in the fact, that user nixbld5 already exists. Which isn't the case. Problem exists, because other user has conflicting UniqueID, in my case it was failing on nixbld9. Compare it with $ dscl . -list /Users UniqueID output:

nixbld1                 30001
nixbld2                 30002
nixbld3                 30003
nixbld4                 30004
nixbld5                 30005
nixbld6                 30006
nixbld7                 30007
nixbld8                 30008
nobody                  -2
prey                    30009 <----- user created by different tool
root                    0
singles                 501

Debugged with help of @periklis.

@periklis
Copy link

cc @grahamc @LnL7 is that still a problem?

@stale
Copy link

stale bot commented Feb 22, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 22, 2021
@idontgetoutmuch
Copy link

It's still a problem for me

Wandle% dscl . -list /Users UniqueID | grep 301
dscl . -list /Users UniqueID | grep 301
SonosDMS                 301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants