LDAP Column Order of CSVDE Export

岁酱吖の 提交于 2020-01-15 10:24:06

问题


I am facing the problem, that the csvde.exe export from an ActiveDirectory changes the order of the columns. I am aware of the following line in the CSVDE documentation:

LDAP can return attributes in any order, and csvde does not attempt to impose any order on the columns.

I also saw this question. However I was wondering why LDAP is returning different orders on different pcs or even on different queries. Let me show you an example:

These are the two commands:

csvde -u -f userdata_it.csv -d "ou=it,dc=your-company,dc=org" -l objectClass,SamAccountName,CN,Distinguishname,memberOf

csvde -u -f userdata_entwicklung.csv -d "ou=entwicklung,dc=your-company,dc=org" -l objectClass,SamAccountName,CN,Distinguishname,memberOf

The are exactly the same, expect for the organisational unit. But I have a pc, that will get the csvcolumn order for the first query: objectClass,SamAccountName,CN,Distinguishname,memberOf

And for the second query:
objectClass,SamAccountName,CN,memberOf,Distinguishname

I was wondering why this is happening? Because on another pcthis works like expected. Are there any known solutions? Maybe another program than csvde?


回答1:


The results of an LDAP search is not repeatable, that is, the ordering is not repeatable, or predictable. LDAP clients must not assume ordering of the entries, attributes, or attribute options in an LDAP search result.

see also

  • LDAP: Ordering
  • LDAP: Programming Practices


来源:https://stackoverflow.com/questions/13763548/ldap-column-order-of-csvde-export

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!