I can see the user in ldap database, but I can't find it in ambari database, but when I try to sync the userID, it says id doesn't exist, but I can see it in ldap database.
ambari-server sync-ldap --users userlist.txt
Using python /usr/bin/python
Syncing with LDAP...
Enter Ambari Admin login: admin
Enter Ambari Admin password:
Syncing specified users and groups...ERROR: Exiting with exit code 1.
REASON: Caught exception running LDAP sync. Couldn't sync LDAP user userid123, it doesn't exist
Can you share your /var/log/ambari-server/ambari-server.log, it could be a good pointer and source of resolving your problem.
Apart from that, there is also a nice tool there is a ldap tool developed in python you need Python 3