You can retrieve the usernames but you cannot retrieve passwords, for obvious security reasons and the user-password attribute is write-only.
using System.DirectoryServices;
DirectoryEntry entry = new DirectoryEntry("LDAP://PathToStartOfSearch");
DirectorySearcher mySearcher = new DirectorySearcher(entry);
mySearcher.Filter = ("(&(objectClass=user))");
foreach(SearchResult result in mySearcher.FindAll())
{
Console.WriteLine( result.GetDirectoryEntry().Path );
}
RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome