OS X Lion: Using dscl(1) in Single User mode

Learn how to use dscl(1) in Single User mode.

This article has been archived and is no longer updated by Apple.
  1. Start your computer into Single User mode by holding Command-S during startup.
  2. If there is a possibility that your hard drive's file system has issues, you should use fsck(8) to verify and repair it if necessary (if not, skip to the next step). Read this article for more information about using fsck(8).
  3. Issue these commands to mount the file system and load opendirectoryd(8):

    mount -uw /

    launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist

 You can now use dscl(1) to connect to Directory Service nodes your Mac is able to contact.

Note: When running dscl(1) from Single User mode, you'll see this message:

launchctl: Couldn't stat("/System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist"): No such file or directory nothing found to load

This message can be safely ignored.

Last Modified:
Helpful?

Additional Product Support Information

Start a Discussion

in Apple Support Communities
See all questions on this article See all questions I have asked
United States (English)