|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Active Directory Services using Java API
Hello All,
I want to know whether its possible to connect to Active Directory Services through Java and able to retreive the users and groups from Active Directory Services. If its possible can i get the code. thanks Winston |
|
#2
|
|||
|
|||
|
any answer ?
did you get any solution ?
I am interested too. Thanks. Antheo. |
|
#3
|
||||
|
||||
|
AD exposes an LDAP interface, so it could be possible to connect to like any other LDAP server.
On Sourceforge there is a specific taglib, other material on OpenLDAP. |
|
#4
|
|||
|
|||
|
i searched on sourceforge and openldap regarding the ldap interface for active directory.
i found nothing on sourceforge... and the only link from openldap was to novell. i've been trying to get it for sometime, but novell does not allow download accelerators nor continuation applications (it seems) and i've been "timed out" way too many times, that frustration has built up. i would like pabloj to be more specific in his post, or maybe provide a link as to where his two direction is? or if novell is correct and worth me trying to get it downloaded, as i've gotten the netscape ldap sdk only find it is specifically for developing with netscape (it seems..) please? thx Last edited by Shift244 : January 12th, 2004 at 04:19 AM. |
|
#5
|
|||
|
|||
|
I succeedeed connecting to AD by using the jndi tutorial from Sun.
Take a look at it. |
|
#6
|
|||
|
|||
|
thx antheo! found the stuff and looks workable.. trying it out!
![]() |
|
#7
|
|||
|
|||
|
i've run into problems again. i've created a user account "john doe", and did not place it into any groups. right now, i keep gettting:
javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C09030B, comment: AcceptSecurityContext error, data 525, v893 there is some sort of authentication problem here. i'm using the following: env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://"+ address ort+"/dc=domain,dc=name,dc=com");env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_PRINCIPAL, "cn=john doe,dc=domain,dc=name,dc=com"); env.put(Context.SECURITY_CREDENTIALS, password); i've also tried with "ou=user" after "cn=doe" to no avail. i'm connecting to win2k server with service pack 3 installed, and i can get a connection using LDAPbrowser (from Jarek Gawor) using the same values. |
|
#8
|
|||
|
|||
|
Quote:
Hello, Can you please send me the code to connect to AD using JNDI. Also, please let me know which jar file needs to be put in the classpath. Thanks in advance. Andy |
|
#9
|
||||
|
||||
|
Hi Shift244, sorry for the delay.
I was referring to: http://www.openldap.org/jldap/ http://www.openldap.org/jdbcldap/ http://opensource.socialchange.net.au/ldaptaglib/
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins |
|
#10
|
||||
|
||||
|
Thanks guys, I was looking for a solution to a similar problem.
__________________
Saving money is easy with discount codes from under tag coupons. Coupon codes for online purchases. |
|
#11
|
|||
|
|||
|
Java code to connect o active directory
Hello,
Can nayone please send me the code to connect to AD using java code . Also, please let me know which jar file needs to be put in the classpath. Thanks in advance. Alvi ![]() |
|
#12
|
||||
|
||||
|
Nemath you should start a new thread makes it alot easier to find your post.
__________________
Miscellaneous Software Viper_SB Developershed E-Support Anyone else play chess? Challenge me |
|
#13
|
|||
|
|||
|
Hi,
import javax.naming.*; import javax.naming.directory.*; import java.util.Hashtable; class DomainCon { public static void main(String args[]) { Hashtable env= new Hashtable(11); env.put(Context.SECURITY_AUTHENTICATION,"none"); env.put(Context.SECURITY_PRINCIPAL,"CN=kiran,OU=LinkedgeOU,DC=LINKEDGEDOMAIN");//User env.put(Context.SECURITY_CREDENTIALS, "kiran");//Password env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL,"ldap://testing2:389/DC=LINKEDGEDOMAIN"); try { DirContext ctx = new InitialDirContext(env); String[] sAttrIDs = new String[2]; Attributes attr = ctx.getAttributes(""); System.out.println("Domain Name:"+ attr.get("name").get()); } catch(NamingException e) { System.err.println("Problem getting attribute: " + e); } } } This java code will help you ou to connect with active directory |
|
#14
|
|||
|
|||
|
ADS Access
Winston..
Please read this article . http://forum.java.sun.com/thread.jspa?threadID=581444&messageID=3313188 Quote:
|
|
#15
|
|||
|
|||
|
Hello
Quote:
Hello, This is Bharadwaj. can you please guide me, where you found the tutorial for connecting to Active Directory using JAVA programming. Can you please gimme the exact link for that tutorial. I need to finish this task given by my PM urgently. Please help me. Thank You |
![]() |
| Viewing: Dev Shed Forums > Databases > LDAP Programming > Active Directory Services using Java API |
| Thread Tools | Search this Thread |