I'm running Mac OS X 10.14.1 revision 18B75

I created a user using dscl and set its home directory to a wrong path with this command:

sudo dscl . -create /Users/theusername NFSHomeDirectory /the/wrong/path

Now I want to fix this. I tried these commands:

sudo dscl . -changei /Users/theusername NFSHomeDirectory 1 /the/right/path


sudo dscl . -change /Users/theusername NFSHomeDirectory /the/wrong/path /the/right/path

but in both cases I get this:

<main> attribute status: eDSPermissionError
<dscl_cmd> DS Error: -14120 (eDSPermissionError)

Why am I getting a permission error even if I'm running as root? How can I fix the wrong path?

  • What version of macOS are you running? – Monomeeth Dec 11 '18 at 11:46
  • @Monomeeth 10.14.1 revision 18B75. I edited my question to include that info. – silviot Dec 11 '18 at 16:20

Its a good question. I honestly have no idea. Does Apple still support using NFS home directories?

The only thing I can think of is to mention that using sudo is not the same as executing a command with uid=0, gid=0. Necessarily. Anymore.

And this is particularly applicable within the context of Directory Services, I think (?), because that's where you Enable Root User these days. So I might try enabling root in Directory Utility, and trying with a proper su root?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .