Univention Bugzilla – Bug 43189
univention-adsearch uses a different attribute separator to univention-s4search
Last modified: 2018-12-05 17:25:43 CET
The usage of univention-adsearch is strange to a customer and to me too, because only the first attribute is returned, even if more than one was requested. The customer tried the same usage of the command as he knows from univention-ldapsearch and univention-s4search: univention-s4search cn=test1 badPasswordTime whenChanged userPrincipalName # record 1 dn: CN=test1,CN=Users,DC=sunshine,DC=local badPasswordTime: 0 userPrincipalName: test1@SUNSHINE.LOCAL whenChanged: 20161119090401.0Z univention-adsearch cn=univention1 badPasswordTime sAMAccountType primaryGroupID # # univention-adsearch # filter: cn=univention1 # DN: CN=univention1,CN=Users,DC=sunshinead,DC=ad badPasswordTime: 131257984756992000 To get the desired result from the adsearch you have to separate the attributes by comma: root@ucs-master-ad:~# univention-adsearch cn=univention1 badPasswordTime,sAMAccountType,primaryGroupID # # univention-adsearch # filter: cn=univention1 # DN: CN=univention1,CN=Users,DC=sunshinead,DC=ad sAMAccountType: 805306368 primaryGroupID: 513 badPasswordTime: 131257984756992000 Maybe at least a hint in the univention-adsearch help would be nice: root@ucs-master-ad:~# univention-adsearch --help This is univention-adsearch Univention-adsearch uses the settings of "univention-ad-connector" to ldap-search an Active-Directory Server. Usage: univention-adsearch [-c configbase] filter <attributes> The default configbase is "connector". It would be most awesome to have the same usage as univention-s4search and univention-ldapsearch
-> univention-adsearch 'sAMAccountName=Domänencomputer' dn objectGUID DN: CN=Domänencomputer,CN=Users,DC=w2k12,DC=test objectGUID: 2679db18-d4b1-4717-acfc-3a43084c178c ce4ef7215cd66ea619f0e7cbf36f94665b112f7a - univention-ad-connector 252e48eeb342ebe7960b2537c41f849539f8578b - yaml
Cool, I can mix space and ',' as much as I feel like! So this change is backwards-compatible, excellent.
<http://errata.software-univention.de/ucs/4.3/354.html>