You could write a script to dump the data into a file that resembles /etc/passwd and /etc/shadow and then use the migrate_passwd.pl script to convert it into LDIF format.
Here is a basic migrate_passwd.pl user guide.
I'm sure there are other ways, but this the simplest one I can think of. Passwords would be a problem if the DB stores them in a non Linux encryption format so that creation of a /etc/shadow clone would be difficult. There may be functions out there that can return an encrypted password Linux style password out there, assuming you can decrypt the DB passwords in the first place.