I have groups.txt file when I i sync lLDAP/AD with ambari it will get sync but my query is if new user is added to the group and again sync command is executed will it throw any error or new member will be added into the group and it will be reflected in the ambari .
ambari-server sync-ldap --users users.txt --groups groups.txt
No, sync-ldap will just sync the users/groups or both . It won't throw any error if the user or group is already sync. .. You can run this command as many times.
If the ldap sync fails die to any other reason then you might want to Review log files for failed synchronization attempts, at /var/log/ambari-server/ambari-server.log on the Ambari Server host.
Thanks for your reply !!
but if suppose when I second time sync group with ambari . what will happen in these two cases :
1. new user is added into the group and ldap/ambari sync command is executed ?
2. when second time command is executed and before that one user is removed from the group in AD will that user also get removed from ambari when second time sync will happen ?