RedHat Directory Server error “do_admserv_post_config unable to create AdmldapInfo”

At work today, I was working on a project to enable SSL encryption for our Netapp filer heads. That project is still ongoing as of this writing, but I made some changes to the admin-server portion of RedHat Directory Server over the last couple of days, and at some point, something broke. When I tried to restart the server, I got the error (in essence) do_admserv_post_config unable to create AdmldapInfo in the admin-serv error log. A bunch of googling resulted in me pulling my hair out because the answer was that your configuration is hosed and you need to start over. Well, I wasn’t about to have any of that.

After looking over the server-side config, I noticed that /etc/dirsrv/admin-serv had a backup of a file (admpw) that I had modified 2 days ago, but then restored because it didn’t produce the desired results. This file contains an SSHA encrypted hash of the admin password, which the admin-server uses to start itself. What I noticed was that while the backup was there, and I had restored the backup to the original (keeping the backup file also) — the original was gone.

Once I re-restored the backup file, the admin-server started right up without errors.

No idea how it got deleted in the first place, must have been something I did when I was tired, but I sure am glad I made a backup of the file before I modified it, and that I kept that backup after I restored it!

 

So, if you ever have that error, look for a missing /etc/dirsrv/admin-serv/admpw file or if it has been renamed and the config changed to look for the new name, then look for the new filename in /etc/dirsrv/admin-serv. It might just be that that is missing and causing the (cryptic) error above.