Friday, October 7, 2011

Using OS X directory services (dscl, dseditgroup) in single user mode

To access directory services you first need a writable root:
mount -uw /
Then you need the daemon loaded. On snow leopard:
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
And on Lion:
launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist

On lion you might see an error about DirectoryServices.plist not existing when you connect with dscl, it can be ignored.

No comments: