Apache Directory Studio 如何添加新用户

ApacheDS 的相关中文资料真是太少了,英文资料也不好找呀,官网的基本上是需要耗费大量时间来学习 

上网上找了 一篇文章  ,按着下面的操作,可以方便的添加新用户,以及如何检查是否正确


另外几个缩写的意思如下:

cn :common name 常用名

sn:surname   别名


1.Right-click on the ou=users node and select New Entry. The New Entry wizard appears. 


2.In the Entry Creation Method pane, you do not need to change any settings. Click Next. 

3.In the Object Classes pane, select inetOrgPerson from the list of Available object classes on the left and then click Add to populate the list of Selected object classes. Click Next. 

4.In the Distinguished Name pane, complete the RDN field, putting uid in front and jdoe after the equals sign. Click Next. 

5.Now fill in the remaining mandatory attributes in the Attributes pane. Set the cn (common name) attribute toJohn Doe and the sn (surname) attribute to Doe. Click Finish. 

6.Add a userPassword attribute to the user entry. In the LDAP Browser view, you should now be able to see a new node, uid=jdoe. Select the uid=jdoe node. Now, right-click in the Entry Editor view and select New Attribute. The New Attribute wizard appears. 

7.From the Attribute type drop-down list, select userPassword. Click Finish. 

8.The Password Editor dialog appears. In the Enter New Password field, enter the password, 123456. ClickOk. 

9.To add more users, repeat steps 7 to 14. 

10.To verify new created user and password, right-click the connection name, select Properties, click onAuthentication, enter the username you just created and the password. 

or you can test connection with apacheDS API, sample: 

Java代码 
LdapConnection connection = new LdapNetworkConnection("192.168.71.82", 10389); 
BindRequest bindRequest = new BindRequestImpl(); 
Dn dn = new Dn("uid=mike,ou=users,ou=system"); 
bindRequest.setDn(dn); 
bindRequest.setCredentials("123456"); 
BindResponse bindResponse = connection.bind(bindRequest); 
System.out.println(bindResponse.getLdapResult()); 
connection.unBind(); 
connection.close();

猜你喜欢

转载自blog.csdn.net/gs80140/article/details/50058569