By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,630 Members | 1,166 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,630 IT Pros & Developers. It's quick & easy.

How to Authenticate NDS server using C#

P: n/a
Ram

How to Authenticate NDS server using C#
Nov 15 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
> 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
Nov 15 '05 #2

P: n/a
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. i also want to create a new attribute under
that user and set a value for it . please help me

Ram
-----Original Message-----
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'tauthenticate NDS servers......

Marc

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

Nov 15 '05 #3

P: n/a
> 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
Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.