Precisely what ldap attribute are you setting user id numbers in AD? You may want to check. There are numerous attribute names that include uid and gid, but you need the correct one.