Open directory restore failing

Discussion in 'Mac OS X Server, Xserve, and Networking' started by Aussie John, Nov 18, 2012.

  1. macrumors member

    Joined:
    Jun 26, 2004
    #1
    I have rebuilt our server and updated to 10.8 (previously 10.7).
    When I try to restore the OD database i get the following error. (FYI DNS resolves).



    mail:~ svradmin$ sudo slapconfig -restoredb /Volumes/Server\ HD/OD/nov\ 2012\ OD\ archive.sparseimage
    2012-11-18 10:13:21 +0000 slapconfig -restoredb
    2012-11-18 10:13:21 +0000 1 Mounting the archive
    2012-11-18 10:13:21 +0000 command: /usr/bin/hdiutil attach /Volumes/Server HD/OD/nov 2012 OD archive.sparseimage -readonly
    Enter disk image passphrase:
    2012-11-18 10:13:28 +0000 command: /usr/bin/hdiutil attach -stdinpass /Volumes/Server HD/OD/nov 2012 OD archive.sparseimage -readonly
    2012-11-18 10:13:30 +0000 Error: Command failed with exit code 1: out=, errmsg=hdiutil: attach failed - Authentication error
    2012-11-18 10:13:30 +0000 Unable to mount the archive (error = 1)
    2012-11-18 10:13:30 +0000 Removed file at path /var/run/slapconfig.lock.
    mail:~ svradmin$

    Any suggestions appreciated
     
  2. macrumors 6502a

    Joined:
    Sep 10, 2012
    #2
    RE: disk image...

    Hi,

    Tough one...

    It looks like the disk image requires a password in order to attach to it, which hdituil prompts for, but then the password is not supplied so it fails.

    What happens if you use the -q option on the slapconfig? Does it still fail or is the password supplied?

    Switon
     
  3. thread starter macrumors member

    Joined:
    Jun 26, 2004
    #3
    the image is created in server admin (Open directory), when creating archive option which prompts for a password when creating.
     
  4. macrumors 6502a

    Joined:
    Sep 10, 2012
    #4
    RE serveradmin commandline...

    Hi,

    Are you running 10.6.8 or 10.7.4 server? It sounds like a bug in the server admin app. Instead of using the GUI version of server admin, what if you try using the serveradmin commandline command? You might get it to work this way.

    Switon
     
  5. thread starter macrumors member

    Joined:
    Jun 26, 2004
    #5
    I have installed 10.8.
    and I did use the command line

    sudo slapconfig -restoredb /Volumes/Server\ HD/OD/nov\ 2012\ OD\ archive.sparseimage

    cheers
     
  6. macrumors 6502a

    Joined:
    Sep 10, 2012
    #6
    re: -q

    Then I would at least try the -q option....what have you got to loose? Switon.
    Probably won't work...but there is a chance it will stop the prompt (which fails) and just supply the password.
     
  7. mire3212, Nov 19, 2012
    Last edited: Nov 19, 2012

    macrumors newbie

    Joined:
    May 28, 2010
    Location:
    Austin, TX
    #7
    See if you can open the disk image outside of Terminal, just find it in the Finder and double click it. If you can't supply the correct passphrase, it will fail when being run from from the command line.

    The important thing from your log snippet is this:

    Enter disk image passphrase:
    2012-11-18 10:13:28 +0000 command: /usr/bin/hdiutil attach -stdinpass /Volumes/Server HD/OD/nov 2012 OD archive.sparseimage -readonly
    2012-11-18 10:13:30 +0000 Error: Command failed with exit code 1: out=, errmsg=hdiutil: attach failed - Authentication error

    That error is indicating that the Archive password is NOT what you typed when it asked to enter the passphrase.
     
  8. thread starter macrumors member

    Joined:
    Jun 26, 2004
    #8
    Well I resaved the archive and saved to the disk of the new installation. Now the restore seems to work. Thanks for responses
     

Share This Page