Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LDAP DN from a NDS context

61 views
Skip to first unread message

ecopy

unread,
Apr 10, 2007, 2:22:40 PM4/10/07
to
Hi,

Environment : Windows XP, eDirectory 8.7.3
Application written using C API.

What NDS calls do I need to make to get the fully qualified LDAP DN for
the currently logged on user ?
All I have for the user is the username, password and treename

-Alexei

Guenter

unread,
Apr 11, 2007, 7:12:46 AM4/11/07
to
Hi Alexei,

wco...@ecopy.com (ecopy) wrote in news:QBQSh.6908$1G3.650@prv-
forum2.provo.novell.com:

your post is a bit misleading cause speak here about the LDAP DN; I guess
though you mean the client API...;
the clib NDK comes with a sample which is named ndscontx; I've modifed this a
bit to return the full typed username:
http://www.gknw.net/development/samples/mingw32/ndscontx.zip
another test sample from my code graveyard is this:
http://www.gknw.net/development/samples/mingw32/nwgetuser.zip
call this with parameter '-typedfullname' to get what you need....
these samples are compiled with the free MingW32 gcc compiler.

see also here for an older article about API usage:
http://support.novell.com/techcenter/articles/dnd19970904.html

HTH, Gün.

ecopy

unread,
Apr 12, 2007, 7:36:01 AM4/12/07
to
Hi Guenter,

Thank you for the code sample.
I will check it out and let you know.

I tried something similar earlier, and I got this back

cn=aisac.ou=qa.o=ecopy

But, I was expecting this instead

cn=aisac,ou=qa,o=ecopy

Some of our customers have a '.' in their OU names.
So in this case doing a search and replace for a '.' with ',' will not
work.
I was wondering if there is something right out of the box that could give
me the DN instead of the extra step.

I am hoping your sample gives me the DN without the extra step =)

Thank you,

Guenter

unread,
Apr 12, 2007, 11:43:06 AM4/12/07
to
Hi Alexei,
wco...@ecopy.com (ecopy) wrote in
news:BQoTh.289$1r...@prv-forum2.provo.novell.com:

> Hi Guenter,
>
> Thank you for the code sample.
> I will check it out and let you know.
>
> I tried something similar earlier, and I got this back
>
> cn=aisac.ou=qa.o=ecopy
>
> But, I was expecting this instead
>
> cn=aisac,ou=qa,o=ecopy
>
> Some of our customers have a '.' in their OU names.
> So in this case doing a search and replace for a '.' with ',' will not
> work.
> I was wondering if there is something right out of the box that could
> give me the DN instead of the extra step.
>
> I am hoping your sample gives me the DN without the extra step =)

no, it doesnt. You use here the client API which is not = LDAP. I'm not aware
of anything that returns LDAP format within client API. Also I really doubt
that having dots on OU names is supported by Novell - how should a typeless
login then work? I've just checked with nwadm32 on NW 6.5, and when I try to
create a OU with a dot I get an error 'Invalid name was entered' back. Are
you really sure that they have dots in OU names? If so I would assume that
their NDS is busted, and try a ndsrepair.

greets, Guen.

and...@abgcard.ru

unread,
Apr 16, 2007, 10:07:45 AM4/16/07
to
Hi All,

LDAP SDK contains ldap_nds_to_ldap() function which may help you.

Best Regards,
Andrey Karyagin

ABG Card Technology
Software Development Department

0 new messages