zabbix-tooling / zabbix-ldap-sync

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

Script adds users to random group #40

Closed scoopex closed 2 years ago

scoopex commented 2 years ago

@vryzhevsky: With the relatively new "alldirusergroup" flag, the script adds all found users reproducible to the same, but unconfigured group. (https://github.com/zabbix-tooling/zabbix-ldap-sync/pull/33/files)

Config example:

[ldap]
type = activedirectory
uri = ldaps://adds.yoloapp.de:636/
base =  DC=yoloapp,DC=de
binduser = gagaga@yoloapp.de
bindpass = sdkfjhksjdfkjkkkkjhkjh
groups = org_yolo_sre_regular:3,org_yolo_software_development_regular:1,org_yolo_software_development_srelight:3,org_yolo_customer_success_regular:6,org_yolo_finance_regular:6,org_yolo_+product_regular:6,org_yolo_marketing_regular:6
media = mail
ignore_tls_errors = true

[activedirectory]
filtergroup = (&(objectClass=group)(name=%s))
filteruser = (&(objectClass=user)(objectCategory=Person))
filterdisabled = (!(userAccountControl:1.2.840.113556.1.4.803:=2))
filtermemberof = (memberOf:1.2.840.113556.1.4.1941:=%s)
groupattribute = member
userattribute = userPrincipalName

[zabbix]
server = https://zabbix.yolo.de
username = Admin
password = sdfskjdhfkjshdfkjsdfkkKHJKHKJKKKJHKJHKJH
auth = webform
alldirusergroup = yolo synced users
ignore_tls_errors = false

[user]
roleid = 6
timezone = Europe/Berlin
rows_per_page = 100
# display password when creating new users
show_password = true

[media]
name = Email (HTML) - Sendgrid
period = 1-7,06:30-22:00
# 1=disabled, 0=enabled
active = 1
severity = Disaster,High,Average
onlycreate = true
scoopex commented 2 years ago

fixed