repair sequoia option fails with eDSPermissionError (DS Error -14120) #29

Open
opened 2024-10-03 20:51:42 +00:00 by peret · 2 comments

Hello,

I tried fixing my lix installation today, after the MacOS Sequoia update. I used the command provided in the Wiki:
curl -sSf -L https://install.lix.systems/lix | sh -s -- repair sequoia

However, the script runs into the error below when trying to create the new user. Any advice on how to fix or debug this?

Error

Error: 
   0: Failed to execute command with status 40 `"/usr/bin/dscl" "." "-create" "/Users/_nixbld5" "UniqueID" "31005"`, stdout: 
      stderr: <main> attribute status: eDSPermissionError
      <dscl_cmd> DS Error: -14120 (eDSPermissionError)


Metadata

key value
version 0.17.1
os macos
arch aarch64
Hello, I tried fixing my lix installation today, after the MacOS Sequoia update. I used the command provided in the Wiki: `curl -sSf -L https://install.lix.systems/lix | sh -s -- repair sequoia` However, the script runs into the error below when trying to create the new user. Any advice on how to fix or debug this? ## Error ``` Error: 0: Failed to execute command with status 40 `"/usr/bin/dscl" "." "-create" "/Users/_nixbld5" "UniqueID" "31005"`, stdout: stderr: <main> attribute status: eDSPermissionError <dscl_cmd> DS Error: -14120 (eDSPermissionError) ``` ## Metadata |key|value| |--|--| |**version**|0.17.1| |**os**|macos| |**arch**|aarch64|
Member

This is quite odd. I found some old upstream issues, that suggest that it... happens, sometimes, I guess. Huh.

The two root causes that seem to be often causing this issue are:

  1. Launching the installer from non-graphical environment. I'm not sure why, but looks like MacOS really wants to have it run graphically.
  2. Not having SecureToken on your current user. I'm not confident I can explain it, so here's a link with explanation.

Can you try and check if the upgrade goes fine after fixing those issues?

This is quite odd. I found some old upstream issues, that suggest that it... happens, sometimes, I guess. Huh. The two root causes that seem to be often causing this issue are: 1. Launching the installer from non-graphical environment. I'm not sure why, but looks like MacOS really wants to have it run graphically. 2. Not having SecureToken on your current user. I'm not confident I can explain it, so here's a [link with explanation](https://it.megocollector.com/macos/cant-delete-a-macos-user-with-dscl-resolution/). Can you try and check if the upgrade goes fine after fixing those issues?
Member

There's now a log message about it, at least:

Some(40) if stderr.contains("-14120") => {
// The user is on an ephemeral Mac, like detsys uses
// These Macs cannot always delete users, as sometimes there is no graphical login
tracing::warn!("Encountered an exit code 40 with -14120 error while removing user, this is likely because the initial executing user did not have a secure token, or that there was no graphical login session. To delete the user, log in graphically, then run `/usr/bin/dscl . -delete /Users/{}`", name);
},

Currently only in main. This could get a better error reporting, though.

There's now a log message about it, at least: https://git.lix.systems/lix-project/lix-installer/src/commit/12a8592afe0cd5f29e20f03ba2fd433ca5354004/src/action/base/create_user.rs#L380-L384 Currently only in `main`. This could get a better error reporting, though.
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix-installer#29
No description provided.