473,405 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

LDAP


Hi,

I am trying to bind to an Active Directory server using the following snippet, but I always get a usre unknown or bad password error message.
DirectoryEntry de = new DirectoryEntry(LDAP://srv-dell.waysoft.local);
de.AuthenticationType = AuthenticationTypes.ServerBind;
de.Username = "administrator";
de.Password = "password";
string usr = de.Properties["DisplayName"].Value.ToString(); // the error message appears here

Any idea of what is wrong?

Thanks.
Mike
Nov 16 '05 #1
3 4526
As the message says, it means the user credentials are unknown.
You specified administrator as UserName, but this is a local administrator account, you need to specify a domain admin account.

Willy.

"Mike" <no****@nospam.com> wrote in message news:OD**************@tk2msftngp13.phx.gbl...

Hi,

I am trying to bind to an Active Directory server using the following snippet, but I always get a usre unknown or bad password error message.
DirectoryEntry de = new DirectoryEntry(LDAP://srv-dell.waysoft.local);
de.AuthenticationType = AuthenticationTypes.ServerBind;
de.Username = "administrator";
de.Password = "password";
string usr = de.Properties["DisplayName"].Value.ToString(); // the error message appears here

Any idea of what is wrong?

Thanks.
Mike
Nov 16 '05 #2

Thanks Willy. I can now see the various properties. Is there a possibility to query the Active Directory to gather some information about the user (group, phone, etc.)? How can I do that?

Thanks.
Mike
"Willy Denoyette [MVP]" <wi*************@pandora.be> wrote in message news:ue**************@TK2MSFTNGP11.phx.gbl...
As the message says, it means the user credentials are unknown.
You specified administrator as UserName, but this is a local administrator account, you need to specify a domain admin account.

Willy.

"Mike" <no****@nospam.com> wrote in message news:OD**************@tk2msftngp13.phx.gbl...

Hi,

I am trying to bind to an Active Directory server using the following snippet, but I always get a usre unknown or bad password error message.
DirectoryEntry de = new DirectoryEntry(LDAP://srv-dell.waysoft.local);
de.AuthenticationType = AuthenticationTypes.ServerBind;
de.Username = "administrator";
de.Password = "password";
string usr = de.Properties["DisplayName"].Value.ToString(); // the error message appears here

Any idea of what is wrong?

Thanks.
Mike
Nov 16 '05 #3
>Thanks Willy. I can now see the various properties.
Is there a possibility to query the Active Directory to gather some information about the user (group, phone, etc.)? How can I do that?


Yes, of course - if you know what you're looking for, you can get
almost everything from AD ! ;-)

To get an understanding of the available properties etc., you can
either study the LDAP schema, or use something like my BeaverTail ADSI
browser to explore your objects.

BeaverTail is written in C#, available free of charge including source
code, from this link:

http://adsi.mvps.org/adsi/CSharp/beavertail.html

Enjoy!
Marc

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: dmcconkey | last post by:
Hi folks, I've been searching for a while and haven't found my specific question anywhere else. If this has already been asked, please accept my appologies and point me to the appropriate...
7
by: Amar | last post by:
I am trying to connect to my college LDAP directory using ASP.NET. This LDap does not have security as it returns only user demographic information. i do not need to bind with a username or...
1
by: Angel | last post by:
Hello all - I have a LDAP service running on a NT4 box (not a mbr of my AD domain), I'd like to extract the users/attributes from that LDAP service and populate my AD domain with those users and...
4
by: m96 | last post by:
hi, i'm trying to make a query to a ldap server (version v2 or v3 doen't matter) with c#. the query works just fine but the problem is that i can't read the custom attributes/fields, since .net...
4
by: Terry Miller | last post by:
I have DB2 V8.2 loaded on a Redhat Enterprise Linux version 3 (RHEL 3) box. RHEL is configured to talk to LDAP for authenticaton besides the local passwd file. I can verify this by executing an su...
2
by: duncan beaumont | last post by:
Hi, - SQLserver 2000 - Yellowfin 2.4 - Windows 2003 server I have been asked to investigate seting up LDAP authentication to access our Yellowfin reporting.
5
by: Jed Parsons | last post by:
Hi, authenticates a user against our ldap server.: User types in name and password, and module sees if name and password check out right with the ldap server. I see that it's pretty...
3
by: sallas | last post by:
Hi, I have a simple LDAPS script: #!/usr/bin/python2.3 import sys import ldap if __name__ == '__main__': ldap.set_option(ldap.OPT_DEBUG_LEVEL,255)
0
by: rbukkara | last post by:
Hi, I have got the following error while trying to add a user in the LDAP Directory. javax.naming.NameNotFoundException: ; remaining name 'uid=vassila,ou=People,dc=cs,dc=uno,dc=edu' I have...
0
by: Sells, Fred | last post by:
I'm running python 2.5 (or 2.4) in an XP environment. I downloaded and installed the .dll's from OpenLDAP-2.4.8+OpenSSL-0.9.8g-Win32.zip and copied the .dll's in c:/windows/system32 as instructed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.