Running pdbedit -a generates a coredump. Problem seems to be in source/passdb/pdb_tdb.c tdbsam_new_rid(). db_sam is unintialised when dbwrap_change_uint32_atomic() gets invoked. Sticking a tdbsam_open() before dbwrap_change_uint32_atomic() seems to help.
*** Bug 6117 has been marked as a duplicate of this bug. ***
Closing out bug report. See bug #6117 for a patch.