How to Authenticate NDS server using C#

  • Thread starter Thread starter Ram
  • Start date Start date
How to Authenticate NDS server using C#

Are you talking about logging into an NDS (Novell Directory Service)
tree from C# ?

You can authenticate a USER against an NDS tree - you don't
authenticate NDS servers......

Marc

================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
Thank u Marc. i need to login to a NDS directory using a
username and password and to retrieve the attributes of
that user. i also want to create a new attribute under
that user and set a value for it . please help me

Ram
 
Thank u Marc. i need to login to a NDS directory using a
username and password and to retrieve the attributes of
that user.

Try to bind to the user either by means of LDAP, or NDS - the two are
distinctly different providers, sometimes one works better than the
other:

DirectoryEntry deUser = new DirectoryEntry("LDAP://cn=John
Doe,cn=Users,dc=fabrikam,dc=com", "your user name", "your password");

// if the user credentials are invalid, your object will be null
if (deUser != null)
{
// access the user's attribute(s), checking for existence first
if (deUser.Properties.Contains("someattribute"))
{
if (deUser.Properties["someattribute"].Count > 0)
{

Console.WriteLine(deUser.Properties["someattribute"].Value.ToString();
}
}
}

So you need to know what your user is called, and where he resides
(which OU etc.).

Alternatively, you might get better results by using the NDS provider
- never used it myself from .NET, but it should work something like
this:

DirectoryEntry deUser = new
DirectoryEntry("NDS://MyNDSTree/O=MyOrg/OU=SomeOU/CN=John Doe", "your
user name", "your password");

Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
Back
Top