Good question
I never tried myself but know that:
- samba.org (wiki) provides some pages dedicated to this specific aspect including discussion about Samba tools
- some people have developed their own migration script to migrate from Samba 3 on LDAP to Samba 4. Search on the web. I know it exists but this doesn't replace hands on experience