Support Questions

Find answers, ask questions, and share your expertise

after deleting user and group from openLDAP server its shows in ambari and ranger

avatar
Expert Contributor

HI,

I have configured openLDAP Server. I have synced LDAP users and groups with ranger as well as ambari.

After deleting the users and groups from openLDAP server, it do not deletes from Ambari and ranger databases.

It do not allow to login using deleted user but it shows in UI.

How to automatically delete users and groups from Ambari and ranger database when users and groups are deleted from openLDAP Server ?

Thank You.

1 ACCEPTED SOLUTION

avatar
Expert Contributor

@Umair Khan

The below command you gave worked for me.

ambari-server sync-ldap --existing

you can use this option to synchronize only those entities that are in Ambari with LDAP. Users and groups will be removed from Ambari if they no longer exist in LDAP.

But,we can use 'all' mode with sync-ldap, that will synchronize those entities that are in Ambari with LDAP, means syncs new entries to the ambari as well as removes entries from Ambari if they no longer exist in LDAP.

 ambari-server sync-ldap --all

so, we can add and remove entries to the Ambari at the same time using single command.

Thanks.

View solution in original post

2 REPLIES 2

avatar
Expert Contributor

If users and groups are deleted in openLDAP server you should use 'existing' mode with ambari ldap sync:

ambari-server sync-ldap --existing

https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.0.0/bk_ambari-security/content/existing_users_a...

avatar
Expert Contributor

@Umair Khan

The below command you gave worked for me.

ambari-server sync-ldap --existing

you can use this option to synchronize only those entities that are in Ambari with LDAP. Users and groups will be removed from Ambari if they no longer exist in LDAP.

But,we can use 'all' mode with sync-ldap, that will synchronize those entities that are in Ambari with LDAP, means syncs new entries to the ambari as well as removes entries from Ambari if they no longer exist in LDAP.

 ambari-server sync-ldap --all

so, we can add and remove entries to the Ambari at the same time using single command.

Thanks.