Pergunta

I want to add and delete users from an OpenDS server, can someone please provide some sample code? I could not find it anywhere, including the OpenDS wiki.

Foi útil?

Solução

The ldapmodify command has the ability to add and delete users. Try checking out the OpenDS source code and reviewing the implementation of the ldapmodify program for an example.

Outras dicas

If you are open to using the GUI, here's how to add admin users: https://docs.opends.org/2.2/page/ManagingUsersWithControlpanel.

If you are open to using Spring, here's a pretty comprehensive example: http://blog.javachap.com/index.php/ldap-user-management-with-spring-ldap/.

If you are using OpenSSO (a sister project to OpenDS), you can use the OpenSSO REST interfaces to admin users.

The UnboundID LDAP SDK provides examples of add, delete, modify, and modify DN operations against an LDAP directory server in the com.unboundid.ldap.sdk.examples package, LDAPModify class.

If you want to use Java to Add and Delete users in OpenDS, you can use JNDI or OpenDJ LDAP SDK (or any other LDAP client api). JNDI is bundle in the JVM and you can find detailed tutorials on Java.sun.com. The OpenDJ LDAP SDK is an external library, has lots of sample code and docs on opendj.forgerock.org. You just need to point to the Maven repository to make use of it.

As Aaron mentioned, Apache Directory Studio is an LDAP GUI built in Eclipse and it works very well with OpenDS and its continuation : OpenDJ.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top