On OS X Mavericks, I am trying to create an account using single user mode, using the following script.
#! /bin/bash
# create user
dscl . -create /Users/hiddenuser
dscl . -create /Users/hiddenuser UserShell /bin/bash
dscl . -create /Users/hiddenuser RealName "Hidden User"
dscl . -create /Users/hiddenuser UniqueID "401"
dscl . -create /Users/hiddenuser PrimaryGroupID 20
dscl . -create /Users/hiddenuser NFSHomeDirectory /var/hiddenuser
dscl . -passwd /Users/hiddenuser password
However, when I run this script, I get 6 copies of the same error:
/System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist: No such file or directory
How do I fix this? Do I need to download a new /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist ?
Thanks
Note: I have tried changed 401 to other values below 501, and I am getting the same result.
fsck -fy
andmount -uw
to check the disk and then mount it with write access? You may also need to preface each command withsudo
.ls -l /System/Library/LaunchDaemons
list some plists or does it give you a "No such file..." error?