logged in windows username cant be searched in LDAP tree on Windows 2000 AD
That is my active directory of myTESTWindows 2000 server:
http://img248.imageshack.us/img248/918/adwn6.gif
On the image yu will find 4 schools with shortcut names called:
OU=ASR
OU=EDS
OU=EKS (EK school for example)
OU=THS (TH school for example)
Under every OU="shortcut of schoolname" you will find also the
OU=Klassen (Klassen = classes in english)
OU=Lehrer (Lehrer = teacher in english)
again under every OU="class" and OU="teacher" you will find also the
pupils and teachers.
the teacher "verena bit" is located in:
"CN=verena bit,OU=Lehrer,OU=ASR,DC=Bodensee,DC=DE"
On theREAL Windows 2000 server used in production i have about 17 schools like OU=ASR or OU=EDS and so on...
My part aim for the first...:
With Java code: String Lehrer = System.getProperty("user.name");
I can retrieve the name of the teacher (Lehrer = teacher) who has logged into the Windows client. The problem is i get for example a String like
"verenabit" but in the ldap hierarchy all common names are for example like this: cn="verena bit" they have always a " " gap between the forename and the lastname so I can not use the String "verenabit" to search for it in the ldap tree as she would not exist right?
What i finally want is to find out the OU="shortcut of schoolname" (see above) by searching for the logged in teacher. So when i have OU="shortcut of schoolname" of the teacher i am able to read ONLY the usernames(teachers+pupils) of that specific school and not all teacher+pupils of all 17 schools what would be about 8000 users :-D
Can someone help me please how can i use the username of the logged in windows user and search him effectively in the ldap tree on my test windows 2000 server.
Steven you want all my points? ROFL ;-)

