|
Question : Active Directory - LDAP Username conflict?
|
|
Hi guys, I am using an Active Directory server. I tried running an LDAP client against the AD server. I was able to bind ONLY using the display name and password, but not using the normal account name and password. For example, If my display name is "Tom Cruise", my account name (internally known as sAMAccountName) is "tcruise", I am able to login only as "Tom Cruise" and the proper password. Is there any way to make it take up the account name? I am sure there must some option somewhere. Help me out!!
Vasanth
|
Answer : Active Directory - LDAP Username conflict?
|
|
hello, does this work? env.put(Context.SECURITY_PRINCIPAL, domain_name+"\\"+username)
It looks strange ( domain_name+"\\"+username ) http://forum.java.sun.com/thread.jsp?thread=306528&forum=51&message=1336272
Also suggested here was to use the UserPrincipalName ( "tcruise@"your company".com" );
I don't know java at all, but in other languages you can accomplish what you need using the IADs interface
The IADs and IDirectoryObject Interfaces http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netdir/adsi/the_iads_and_idirectoryobject_interfaces.asp
a vb example would be..
Dim dso As IADsOpenDSObject Dim obj1, obj2 As IADs Dim szUsername As String Dim szPassword As String
Set dso = GetObject("LDAP:")
' Insert code securely. szUsername = "mdiglio" szPassword = "password" ' Bind using full credentials. Set obj1 = dso.OpenDSObject( _ "LDAP://ADSERVER/ou=One,DC=TWO,DC=Domain,DC=edu", _ szUsername, _ szPassword, _ ADS_SECURE_AUTHENTICATION + ADS_SERVER_BIND)
Hope this helps in some way!
|
|
|
|