From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,87e4cff27c09752d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.135.231 with SMTP id pv7mr1171017pbb.8.1330001923996; Thu, 23 Feb 2012 04:58:43 -0800 (PST) Path: wr5ni59208pbc.0!nntp.google.com!news2.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: "Rego, P." Newsgroups: comp.lang.ada Subject: Re: Windows LDAP group-user checking in Ada 95 Date: Thu, 23 Feb 2012 04:58:43 -0800 (PST) Organization: http://groups.google.com Message-ID: <16575398.9285.1330001923594.JavaMail.geo-discussion-forums@ynbo36> References: <29156956.1684.1329424734114.JavaMail.geo-discussion-forums@yndy9> <4F43CB8C.4010603@obry.net> NNTP-Posting-Host: 201.7.145.1 Mime-Version: 1.0 X-Trace: posting.google.com 1330001923 8878 127.0.0.1 (23 Feb 2012 12:58:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 23 Feb 2012 12:58:43 +0000 (UTC) Cc: "Rego, P." In-Reply-To: <4F43CB8C.4010603@obry.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=201.7.145.1; posting-account=TRgI1QoAAABSsYi-ox3Pi6N-JEKKU0cu User-Agent: G2/1.0 X-Google-Web-Client: true Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-02-23T04:58:43-08:00 List-Id: Pascal, I looked for in AWS, but didn't find anything (but I've never used AWS before, so maybe I have missed something). What I want to do is the equivalent in C# DirectoryEntry rootEntry = new DirectoryEntry("LDAP://dc=yourcompany,dc=com"); DirectorySearcher srch = new DirectorySearcher(rootEntry); srch.SearchScope = SearchScope.Subtree; srch.Filter = "(&(objectcategory=user)(sAMAccountName=yourusername)(memberof=CN=yourgroup,OU=yourOU,DC=yourcompany,DC=com))"; SearchResultCollection res = srch.FindAll(); if(res == null || res.Count <= 0) { Console.WriteLine("This user is *NOT* member of that group"); } else { Console.WriteLine("This user is INDEED a member of that group"); } but in Ada 95.