zabbix-tooling / zabbix-ldap-sync

Sync Zabbix with LDAP directory server
BSD 3-Clause "New" or "Revised" License
50 stars 36 forks source link

Disable users instead of delete #16

Closed dust4sound closed 3 years ago

dust4sound commented 5 years ago

Change/Add option to disable users instead of deleting them, so that the audit logs are kept.

scoopex commented 5 years ago

It seems that there is not option to disable a user. https://www.zabbix.com/documentation/4.2/manual/api/reference/user/object

Depending on the auth mechanism it might be an option to rename a user or to change the password. Do you have ideas how to achieve this?

dust4sound commented 5 years ago

My thoughts on this would be to move them to the 'Disabled' group, and remove all other groups from the user.

scoopex commented 4 years ago

Seems to bee a good idea. Do you want to try to implement this? Pull requests are very welcome :-)

Add a property named "disabled_group" - if its defined and the user was not part of the search results anymore, you can add the user to the name defined in that property.

vryzhevsky commented 3 years ago

Hi, I implemented this. See my Pull request

scoopex commented 3 years ago

Awesome! I will review and test this in the next days: https://github.com/zabbix-tooling/zabbix-ldap-sync/pull/33

scoopex commented 3 years ago

Implemented and merged. Many thanks @vryzhevsky! :-)