3

I am trying to set up a user account on a new M1 MacBook pro, in the terminal in recovery mode.

I use the following commands:

dscl . -create /Users/luser
dscl . -create /Users/luser UserShell /bin/bash
dscl . -create /Users/luser RealName "Lucius Q. User"
dscl . -create /Users/luser UniqueID "1010"
dscl . -create /Users/luser PrimaryGroupID 80
dscl . -create /Users/luser NFSHomeDirectory /Users/luser
dscl . -passwd /Users/luser password

However when I execute the final command I get the following error:

passwd: DS error:eDSOperationFailed
<dscl_cmd> DS Error: -14483 (eDSOperationFailed)

The error code doesn't really tell me much - listed as an authentication error here: http://www.manpagez.com/man/8/DirectoryService/osx-10.4.php

When I execute:

dscl . -read /Users/luser

It seems to have set up the user account.

Does anyone know the correct steps to set up a user account from the terminal in recovery mode on an M1 MacBook Pro, or know how to fix the above error?

2
  • 3
    In recovery mode, you aren't running from your normal system volume(s) or the user accounts DB on them, so changes to the user database don't affect your normal system. I don't know the exact commands to edit the normal DB, but I think it's something like dscl -f "/Volumes/Macintosh HD - Data/private/var/db/dslocal/nodes/Default" localonly -create /Local/Target/Users/luser etc. May 10, 2021 at 17:51
  • Great - that did it @GordonDavisson - thanks
    – user67257
    May 20, 2021 at 13:08

0

You must log in to answer this question.

Browse other questions tagged .