Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i overwrote initial slapd.conf, then removed slapd with "apt-get purge slapd", and reinstalled it.

initial slapd.conf didn't reappear.

what can i do to get it back?

upd: i need the initial one, not the one with my changes!

share|improve this question

It depends which filesystem you were deleteing the file from, NTFS you can recover the file using ntfsprogs (apt-get install ntfsprogs) and then look for deleted files (ntfsundelete).

ext3, I am quite certain that you cannot recover files. This is an extract from ext3 FAQS:

Q: How can I recover (undelete) deleted files from my ext3 partition?

Actually, you can't! This is what one of the developers, Andreas Dilger, said about it:

In order to ensure that ext3 can safely resume an unlink after a crash, it actually zeros out the block pointers in the inode, whereas ext2 just marks these blocks as unused in the block bitmaps and marks the inode as "deleted" and leaves the block pointers alone.

Your only hope is to "grep" for parts of your files that have been deleted and hope for the best.

share|improve this answer
thanks for response, and sorry for unclear question, but i meant the initial "slapd.conf", not the one with my modifications – Pavel K. Feb 15 '10 at 10:26
up vote 1 down vote accepted

ok, i suspect that there is actually no default slapd.conf in newest 9.10 ubuntu package, that's why it doesn't restore it. must be the one from the old version.

share|improve this answer

try to:

dpkg-reconfigure -plow $package

it should create a new file based on your answer.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.