openLDAP for WINDOWS

下载openLDAP for windows 

安装后运行

slapadd -v -l ./test.ldif

运行前请清空 data folder

test.ldif 为

dn: o=tt,c=cn
objectClass: dcObject
objectClass: organization
o: tt
dc: com

dn: uid=sa, o=tt,c=cn
uid: sa
objectClass: inetOrgPerson
mail: xhy@nfschina.com
userPassword: intec
labeledURI: http://www.nfschina.com
sn: sa-sn
cn: sa-cn
 

 

 

条件是必须停掉服务

增加命令

slapadd -l test1.ldif 

 

查询, 命令 

ldapsearch -x -D "cn=Manager,o=tt,c=cn" -w secret -b "o=tt,c=cn"

 

 

# extended LDIF

#

# LDAPv3

# base <o=tt,c=cn> with scope subtree

# filter: (objectclass=*)

# requesting: ALL

#

 

# tt, cn

dn: o=tt,c=cn

objectClass: dcObject

objectClass: organization

o: tt

dc: com

 

# sa, tt, cn

dn: uid=sa,o=tt,c=cn

uid: sa

objectClass: inetOrgPerson

mail: xhy@nfschina.com

userPassword:: aW50ZWM=

labeledURI: http://www.nfschina.com

sn: sa-sn

cn: sa-cn

 

# search result

search: 2

result: 0 Success

 

# numResponses: 3

 

# numEntries: 2

 

 

修改命令

node1:/usr/lib/openldap # ldapmodify -x -D "cn=Manager,o=tt,c=cn" -w secret   -f modify.ldif

 

modifying entry "uid=sa, o=tt,c=cn"

删除命令

 

node1:/var/lib/ldap # ldapdelete -x -D "cn=Manager,o=tt,c=cn" -w secret "uid=sa,o=tt,c=cn"

node1:/var/lib/ldap # ldapsearch -x -D "cn=Manager,o=tt,c=cn" -w secret -b "o=tt,c=cn"

# extended LDIF

#

# LDAPv3

# base <o=tt,c=cn> with scope subtree

# filter: (objectclass=*)

# requesting: ALL

#

 

# tt, cn

dn: o=tt,c=cn

objectClass: dcObject

objectClass: organization

o: tt

dc: com

 

# search result

search: 2

result: 0 Success

 

# numResponses: 2

 

# numEntries: 1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值