Windows Active Dictionary与CSVDE介绍
来源:互联网 发布:淘宝店怎么修改标题 编辑:程序博客网 时间:2024/04/29 22:41
一、导出
导出所有AD配置:
csvde -f output.csv
-r: 按LDAP字段过滤
csvde -f users.csv -r "objectCategory=person"
输出属于user对象类型,并且类别为person的所有项目:
csvde -f users.csv -r "(&(objectClass=user)(objectCategory=person))"
输出userAccountControl值为514或者546或者66050的所有项目:
csvde -f accountControl.csv -r "(|(useraccountcontrol=514)(useraccountcontrol=546)(useraccountcontrol=66050))"
-d: 按DN中的字段过滤
csvde -d "OU=TEST,DC=lesca,DC=bit" -f example.csv
csvde -d "CN=Users,DC=lesca,DC=bit" -f example.csv
-L: 指定LDAP输出字段
csvde -f example.csv -l "DN, objectClass, givenName, sn, name"
综合举例:
csvde -d "OU=Test,dc=lesca,dc=bit" -m -n -f example.csv -r objectClass=user -l "name, objectCategory, DN"
- -m 用于排除诸如ObjectGUID, objectSID, pwdLastSet, samAccountType之类的属性
- -n 禁止输出二进制值
二、导入
CSVDE -i -k -f test.csv
这些必需的属性必须是 .csv 文件中的列标题,如下面的示例所示。
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ADSI Search---objectclass and objectcategory
Object-Class:The list of classes from which this class is derived
Object-Category:An object class name used to groups objects of this or derived classes.
从网上摘抄的,objectclass与objectcategory的一般介绍
Just to clarify, the objectClass attribute is multi-valued. Each object can inherit from one or more classes. User objects have objectClass equal to top, person, organizationalPerson, and user. Contact objects have objectClass equal to top, person, organizationalPerson, and contact. Computer objects have objectClass equal to top, person, organizationalPerson, user, and computer. Thus, a computer object has all of the attributes of a user object, plus some more inherited from the computer class. Computer objects are security principals just like user objects. They need to authenticate to the domain, have passwords (managed by the system), and can be granted permissions. The objectCategory attribute is single-valued. The value is a Distinguished Name. For user objects objectCategory is MyDomain.com is the domain. For contact objects objectCategory is the same, objects objectCategory is When searching AD for objects it is more efficient to use objectCategory because it is indexed (objectClass is not), but often a combination of objectClass and objectCategory must be used. The standard search filters are: For user objects: (&(objectCategory=person)(objectClass=user)) For contact objects: (&(objectCategory=person)(objectClass=contact)) For user and contact objects: (objectCategory=person) For computer objects: (objectCategory=computer) For group objects: (objectCategory=group) The provider translates (objectCategory=person) into the correct DN appropriate for the domain. Note that there is no such thing as (objectCategory=user), but the provider translates this into (objectCategory=person), so it includes contact objects. This may not be what you want. Another filter for user objects is: (sAMAccountType=80530636
看了上面的解释,有点明白了在查询ADSI的时候为什么不建议用objectclass,而是建议用objectcategory,因为一个user的objectclass集成了好多,并不是唯一的,像我的账户在域中的objectclass就是top,person,organizationalPerson,user,而我的objectcategory就是CN=Person,CN=Schema,CN=Configuration,DC=ads-telekom,DC=de,这样查询起来范围就少多了
三、CSVDE的不足
- 无法创建账户密码
- 无法创建OU
- Windows Active Dictionary与CSVDE介绍
- csvde
- Windows域 Active Directory介绍
- Windows Serer 2003 配置手册 – 创建Active Dictionary域
- Csvde 将联系人和用户对象导入 Active Directory
- Active/Active与Active/Passive
- The Longman Active Study Dictionary CD
- Dictionary类介绍
- 二 SAP Dictionary介绍
- Active X介绍
- Active Record介绍
- Active Record介绍
- C# Dictionary字典类介绍
- Dictionary 与 Hashtable
- Dictionary 与object
- GetHashCode 与HashTable ,Dictionary
- HashTable与Dictionary
- HashTable与Dictionary比较
- VirtualBox安装CentOS6.4(三)
- java 我又长见识了
- opencv学习-load image and display
- JQ 学习笔记2
- 请同学检查地址是否有误:CSDN博客地址汇总(网络121、网络131、计科1111-1114)
- Windows Active Dictionary与CSVDE介绍
- Cocos2d-x 项目新建自定义类后编译错误:打不开自定义头文件错误解决方案
- C#中用ILMerge将所有引用的DLL和exe文件打成一个exe文件
- 内存泄漏的防范和检测方法
- 在Struts2中使用ValueStack、ActionContext、ServletContext、request、session等 .
- Java计算几何图形的面积
- 十年的打工生涯所绝对体会不到的!
- assert用法
- ZOJ3549 Little Keng(快速幂)