LDAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesLDAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 12th, 2004, 11:09 AM
vikrampn vikrampn is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 2 vikrampn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to vikrampn
javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-

Hello People,
I am trying to connect to Active Directory through jNDI and i keep getting the following error. I saw a lot of people asking hte same question, but no one ever put the solution they found. Can any one be considerable to help me.

Thanks

javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C09030B, comment: AcceptSecurityContext error, data 525, v893


The following is my DirContext settings

env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");

env.put(Context.PROVIDER_URL,"ldap://hodcserver.howost.strykercorp.com:389");

env.put(Context.SECURITY_AUTHENTICATION,"simple");

env.put(Context.SECURITY_PRINCIPAL,"uid=userName,ou=Information Technology Team,ou=New Jersey,dc=ost,dc=srcorp,dc=com");

env.put(Context.SECURITY_CREDENTIALS,"pass");

Reply With Quote
  #2  
Old February 12th, 2004, 02:41 PM
ldap4u's Avatar
ldap4u ldap4u is offline
Chris Larivee
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Littleton, CO
Posts: 72 ldap4u User rank is Private First Class (20 - 50 Reputation Level)ldap4u User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 h 49 m 14 sec
Reputation Power: 7
Send a message via MSN to ldap4u
Error code 49 is the equivalent of bad credentials at login. If you are trying to connect to AD the best method is to bind using sAMAccountName@corp.XXX.com as the user instead of the standard full DN

HTH

Reply With Quote
  #3  
Old February 12th, 2004, 02:55 PM
vikrampn vikrampn is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 2 vikrampn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to vikrampn
Sam Account Binding Code

Hi,
Thanks for your reply. I was trying to figure out how i will bind the sam account instead of complete DN, Can you pls, pls provide me with syntax.

Regards
VIk

Reply With Quote
  #4  
Old February 12th, 2004, 03:01 PM
ldap4u's Avatar
ldap4u ldap4u is offline
Chris Larivee
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Littleton, CO
Posts: 72 ldap4u User rank is Private First Class (20 - 50 Reputation Level)ldap4u User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 h 49 m 14 sec
Reputation Power: 7
Send a message via MSN to ldap4u
So I am not so good with the java - but I would imagine you would bind by replacing

"uid=userName,ou=Information Technology Team,ou=New Jersey,dc=ost,dc=srcorp,dc=com"

with
"useraccountname@corp.xxx.com"

- where useraccountname is the login ID and XXX is the domain your AD runs in ...
Comments on this post
Viper_SB agrees!

Reply With Quote
  #5  
Old January 5th, 2006, 05:08 AM
bernielamotta bernielamotta is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 1 bernielamotta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 10 sec
Reputation Power: 0
Thanks ldap4you,
in your post I found the solution for my problem!
And for all others: you must use the strange syntax which ldap4you described, if you want to contact AD.
I tested it first with the LDAP Browser\Editor v2.8.2 by Derek Gawor, which is good tool.
Good Luck for everybody!

Reply With Quote
  #6  
Old March 15th, 2007, 02:56 AM
ashokchandu ashokchandu is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2007
Posts: 1 ashokchandu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 8 sec
Reputation Power: 0
LDAP Authentication Error

HI, I am also facing with the same problem. I tried with the LDAP browser, saying "Insufficient Access" or "Credential" problem. Can you please tell how you tested it and how it got resolved?

you can mail me directly to(E-Mail address blocked: See forum rules)

Thanks in advance.

Regards,
Chandu.

Quote:
Originally Posted by bernielamotta
Thanks ldap4you,
in your post I found the solution for my problem!
And for all others: you must use the strange syntax which ldap4you described, if you want to contact AD.
I tested it first with the LDAP Browser\Editor v2.8.2 by Derek Gawor, which is good tool.
Good Luck for everybody!

Reply With Quote
  #7  
Old March 27th, 2009, 06:13 PM
LDAP newbie LDAP newbie is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2009
Posts: 1 LDAP newbie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 57 sec
Reputation Power: 0
Thank you sooooo much I didn't try it with the domain name at the end!


Quote:
Originally Posted by ldap4u
Error code 49 is the equivalent of bad credentials at login. If you are trying to connect to AD the best method is to bind using URL as the user instead of the standard full DN

HTH

Reply With Quote
  #8  
Old April 27th, 2009, 06:19 AM
edwtsen edwtsen is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 1 edwtsen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 58 sec
Reputation Power: 0
Hi all,

I am getting the same error. Please let me explain what i have encountered.

In the active directory (version 2003), the administrator can actually limit the access of a particular user to a certain workstation. This can be set by putting the workstation host name or IP (which is allowed to accessed by the user) into a "log on to" list (at the user level). If the administrator wants the user to be able to log on to any workstation, then he / she can check on the "log on to all computer" in the same screen.

When my user has been set to "log on to all computer", i don't encounter the error message i.e. error code 49, as mentioned in the subject of this topic. However, when a particular user has been limited to only access to his own workstation, the error appears. However, if the Active Directory server host name or IP has been added into the "log on to" list, the authentication is successful.

My web application is actually running on an application server and the user is using Internet Explorer to login to my application. The application server has been joined to the same domain as the Active Directory server. My question is, is it a must that the Active Directory server name be added to the "log on to" list of that particular user in order for it to be authenticated by Active Directory. I have been cracking my head for this but still i can't think of any solution for this. I definitely don't want to add the AD server name into the list as this will give the user rights to login to the AD server. Any advise would be of great help. Thanks a million in advance.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesLDAP Programming > javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
Stay green...Green IT