473,508 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4538
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
2854
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
6774
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
3729
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
27920
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
6557
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
3230
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
1963
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
5465
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
3200
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
1833
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
7118
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
7323
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,...
1
7038
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
5625
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,...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1550
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.