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
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.
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,
> 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.
LDAP SDK contains ldap_nds_to_ldap() function which may help you.
Best Regards,
Andrey Karyagin
ABG Card Technology
Software Development Department