Apache Directory Project - create new user

This is Interesting: Free IT Magazines  
Home > Archive > Apache Directory Project > March 2006 > create new user





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author create new user
Andre Fonseca

2006-03-16, 5:45 pm

Hi there,

I created a new LDAP user - ldif is attached - but I could not connect
in the LDAP server using this user/password (credentials??).

What is the objectClass'es that I need to use?

The atribute I used to set the password is "userPassword". - plain
mode, not crypted. (but its crypted in the ldif... :|)

I need to set parent properties to connect in the server??

The Java Exception is below.

Any help is welcome...

OBS: I used JXplorer to create the user...
javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid
Credentials]
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.<init>(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at javax.naming.directory.InitialDirContext.<init>(Unknown Source)
at com.ca.commons.jndi.JNDIOps.openContext(JNDIOps.java:412)
at com.ca.commons.jndi.JNDIOps.<init>(JNDIOps.java:101)
at com.ca.commons.jndi.BasicOps.<init>(BasicOps.java:62)
at com.ca.commons.jndi.AdvancedOps.<init>(AdvancedOps.java:58)
at com.ca.commons.naming.DXOps.<init>(DXOps.java:37)
at
com.ca.directory.jxplorer.broker.CBGraphicsOps.<init>(CBGraphicsOps.java:42)
at
com.ca.directory.jxplorer.broker.JNDIBroker.openConnection(JNDIBroker.java:393)
at
com.ca.directory.jxplorer.broker.JNDIBroker.processRequest(JNDIBroker.java:358)
at
com.ca.directory.jxplorer.broker.Broker.processQueue(Broker.java:158)
at
com.ca.directory.jxplorer.broker.JNDIBroker.processQueue(JNDIBroker.java:877)
at com.ca.directory.jxplorer.broker.Broker.run(Broker.java:124)
at java.lang.Thread.run(Unknown Source)



________________________________________
_______________
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
http://br.acesso.yahoo.com
Stefan Zoerner

2006-03-16, 5:45 pm

Andre Fonseca wrote:
> Hi there,
>
> I created a new LDAP user - ldif is attached - but I could not connect
> in the LDAP server using this user/password (credentials??).
>
> What is the objectClass'es that I need to use?


Hello Andre!

Your object classes work, at least I was able to import a modified
version of you user into my ApacheDS 1.0 RC1 directory:

version: 1
dn: cn=user,dc=example,dc=com
objectClass: organizationalPerson
objectClass: person
objectClass: top
cn: user
sn: user
userPassword: password

What are the values you use for the credentials? In my case I used
User: cn=user,dc=example,dc=com
Pwd: password

Note that you have to use the full DN.

> The atribute I used to set the password is "userPassword". - plain
> mode, not crypted. (but its crypted in the ldif... :|)


One problem might be the form of you userPassword attribute in your
LDIF. Compare my version (one with your version (2 :

userPassword:: dXNlcg==

> I need to set parent properties to connect in the server??


If using another form for the userPassword does not help, please explain
in detail, how you import the user, and whether you can read its values
with the admin account (and a search, for instance) after the import.

I hope this helps. Greetings from Hamburg,
Stefan


Ersin Er

2006-03-16, 5:45 pm

I've just followed the instructions here:

http://directory.apache.org/subproj...entication.html

without any problems. (created and binded)

--
Ersin

Andre Fonseca wrote:
> Hi there,
>
> I created a new LDAP user - ldif is attached - but I could not connect
> in the LDAP server using this user/password (credentials??).
>
> What is the objectClass'es that I need to use?
>
> The atribute I used to set the password is "userPassword". - plain
> mode, not crypted. (but its crypted in the ldif... :|)
>
> I need to set parent properties to connect in the server??
>
> The Java Exception is below.
>
> Any help is welcome...
>
> OBS: I used JXplorer to create the user...
> javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid
> Credentials]
> at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)
> at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
> at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
> at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)
> at com.sun.jndi.ldap.LdapCtx.<init>(Unknown Source)
> at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source)
> at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source)
> at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source)
> at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source)
> at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
> at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
> at javax.naming.InitialContext.init(Unknown Source)
> at javax.naming.InitialContext.<init>(Unknown Source)
> at javax.naming.directory.InitialDirContext.<init>(Unknown Source)
> at com.ca.commons.jndi.JNDIOps.openContext(JNDIOps.java:412)
> at com.ca.commons.jndi.JNDIOps.<init>(JNDIOps.java:101)
> at com.ca.commons.jndi.BasicOps.<init>(BasicOps.java:62)
> at com.ca.commons.jndi.AdvancedOps.<init>(AdvancedOps.java:58)
> at com.ca.commons.naming.DXOps.<init>(DXOps.java:37)
> at
> com.ca.directory.jxplorer.broker.CBGraphicsOps.<init>(CBGraphicsOps.java:42)
> at
> com.ca.directory.jxplorer.broker.JNDIBroker.openConnection(JNDIBroker.java:393)
> at
> com.ca.directory.jxplorer.broker.JNDIBroker.processRequest(JNDIBroker.java:358)
> at
> com.ca.directory.jxplorer.broker.Broker.processQueue(Broker.java:158)
> at
> com.ca.directory.jxplorer.broker.JNDIBroker.processQueue(JNDIBroker.java:877)
> at com.ca.directory.jxplorer.broker.Broker.run(Broker.java:124)
> at java.lang.Thread.run(Unknown Source)
>
>
>
> ________________________________________
_______________
> Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
> http://br.acesso.yahoo.com



Alex Karasulu

2006-03-17, 2:45 am

Andre Fonseca wrote:
> Hi there,
>
> I created a new LDAP user - ldif is attached - but I could not connect
> in the LDAP server using this user/password (credentials??).
>
> What is the objectClass'es that I need to use?

At this point in time you only need the presence of a userPassword field.
> The atribute I used to set the password is "userPassword". - plain
> mode, not crypted. (but its crypted in the ldif... :|)
>

It's not really encrypted but base64 encoded. The userPassword
attributeType actually has a binary syntax. According to the LDIF
specification all binary attributes must be base64 encoded.
> I need to set parent properties to connect in the server??
>

I could not parse this question.
> The Java Exception is below.
>
> Any help is welcome...
>
> OBS: I used JXplorer to create the user...
> javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid
> Credentials]
>

This means you did not:
(1) provide the correct principalDn and/or
(2) provide the correct password

HTH,
Alex


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com