PDA

View Full Version : Open directory restore failing




Aussie John
Nov 18, 2012, 07:34 PM
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



switon
Nov 18, 2012, 09:25 PM
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

Aussie John
Nov 18, 2012, 09:29 PM
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

the image is created in server admin (Open directory), when creating archive option which prompts for a password when creating.

switon
Nov 18, 2012, 09:59 PM
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

Aussie John
Nov 19, 2012, 12:54 AM
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

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

switon
Nov 19, 2012, 02:56 AM
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.

mire3212
Nov 19, 2012, 11:20 AM
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.

Aussie John
Nov 19, 2012, 04:58 PM
Well I resaved the archive and saved to the disk of the new installation. Now the restore seems to work. Thanks for responses