-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
installation fails on macOS (Mojave) during creating /Users/nixbld1 #2542
Comments
This says Mojave further restricts what the root user can do: https://groups.google.com/forum/?nomobile=true#!topic/macenterprise/xL114KoBRPg |
Hitting this too. Big face palm. |
If anyone lands here, this seems to only affect iTerm2 (at least for me...). The workaround was to run the installer from Terminal.app (the default terminal that comes with macOS) instead. You would then just get a popup warning that Terminal wants to administer your mac (or something to that effect...) to which you simply click ok and then it hums along fine. |
Cheers @kreisys you're a bloody legend! |
I created an issue for that in iTerm2 https://gitlab.com/gnachman/iterm2/issues/7545 and it's reported to be already fixed in nightly builds. |
Can we close this, since it's an iTerm2 issue? |
I'm getting the same error on Mojave, but I'm ssh-ed into Remote Login. |
After a bit more digging: nix/scripts/install-multi-user.sh Lines 479 to 484 in 6924bdf
/var/empty
but on Mojave it's set to:
Seems like the best fix is to allow that as a default too. Maybe this bug existed from before, but just default home changes in Mojave? |
Ugh parsing that output with a new line is just insane. Why do we need to set the home anyway? macOS will default to /var/empty and even if it does to /Users/nixbld1 what's the harm? It seems on Mojave there's no way to set user home anymore I'm afraid. |
Proposal: use |
I'm not certain, but in the course of working on #4532 I've come to suspect that |
I marked this as stale due to inactivity. → More info |
After upgrading from High Sierra to Mojave I had issues with nix (it's disappeared, but it's a separate topic) and I decided to reinstall it. I ran
sh <(curl https://nixos.org/nix/install) --daemon
it failed telling me that I already have nix and gave me instructions how to remove it:
sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist sudo rm /Library/LaunchDaemons/org.nixos.nix-daemon.plist sudo mv /etc/bashrc.backup-before-nix /etc/bashrc *reopen terminal sudo mv /etc/zshrc.backup-before-nix /etc/zshrc *reopen terminal sudo rm -rf /etc/nix /nix /var/root/.nix-profile /var/root/.nix-defexpr /var/root/.nix-channels /Users/$USER/.nix-profile /Users/$USER/.nix-defexpr /Users/$USER/.nix-channels
I followed them and ran installation again which failed less gracefully with the error below without any instructions what to do next:
---- sudo execution ------------------------------------------------------------
I am executing:
$ sudo /usr/bin/dscl . -create /Users/nixbld1 NFSHomeDirectory /var/empty
in order to give nixbld1 a safe home directory
<main> attribute status: eDSPermissionError
<dscl_cmd> DS Error: -14120 (eDSPermissionError)
After some research I found instructions here #1551 which also covers deleting nix users.
So I'm wondering if it's possible to make the installation script smart enough and take care of that issue or at least teach it to inform user how to delete these users manually.
Thanks
The text was updated successfully, but these errors were encountered: