简体   繁体   中英

dscl create user doesn't work on el capitan

I am trying to create user on OS X El Capitan with admin priviliges from super-user mode. After running /sbin/fsck -fy and /sbin/mount -uw / and launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist everything works. But after dscl . -create/Users/USERNAME dscl . -create/Users/USERNAME i got error no such file or directory. I tried it even with SIP disabled but it doesn't work too. Thanks for the help.

In El Capitan, the mounts have been changed so that not even root can edit files in some mounts...ACL changes.

The feature is called SIP and is explained in other stack exchange posts:

https://apple.stackexchange.com/questions/208478/how-do-i-disable-system-integrity-protection-sip-aka-rootless-on-os-x-10-11

essentially, can boot into recovery mode, type csrutil disable, boot back into default user mode, make changes, then presumably, you might want to re-enable csrutil similarly.

Thanks for the reply, but SIP had no effect.

I finally solved it. The problem was /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist that was used in 10.6 and earlier, I was using /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist The dscl commands were executed despite the error with plist and user got created.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM