Exemplo n.º 1
0
    public ArrayList getAttribs()
    {
        DirectoryEntry entry = new DirectoryEntry("LDAP://" + domain);
        ArrayList      props = new ArrayList();

        foreach (string strAttrName in entry.Properties.PropertyNames)
        {
            props.Add(strAttrName);
            FsLogger.Append2Log("\n" + strAttrName);
            FsLogger.Append2Log("\n" + entry.Path.ToString());
        }
        return(props);
    }
Exemplo n.º 2
0
    public ArrayList getAcctProps(string user, string pass)
    {
        DirectoryEntry entry     = new DirectoryEntry("LDAP://" + domain, user, pass);
        ArrayList      acctProps = new ArrayList();

        foreach (DirectoryEntry childEntry in entry.Children)
        {
            acctProps.Add(childEntry);
            FsLogger.Append2Log("\n" + childEntry.Name.ToString());
            FsLogger.Append2Log("\n" + childEntry.Path.ToString());
        }
        return(acctProps);
    }
Exemplo n.º 3
0
    public bool authenticate(string user, string pass)
    {
        bool authentic = false;

        try
        {
            DirectoryEntry entry        = new DirectoryEntry("LDAP://" + domain, user, pass);
            object         nativeObject = entry.NativeObject;
            authentic = true;
        }
        catch (DirectoryServicesCOMException dse)
        {
            FsLogger.CreateLog("Auth exception..." + dse.Message + "..." + DateTime.Now.ToString());
        }
        return(authentic);
    }