How to determine if a user is member of a group

From: Albert Waelti (albert.waelti@gmx.net)
Date: 09/04/02


From: "Albert Waelti" <albert.waelti@gmx.net>
Date: Wed, 4 Sep 2002 07:37:28 -0700


Hi

I used ASP.NET to built a web site. The login process is
done using LDAP. This works fine and if an invalid user or
password is entered I get an exception and display an
error message.

Now I'd like to test if the user belongs to a particular
group. How can I do this ?

The DirectoryEntry "memberof" lists all the groups to
which the user belongs, except the primary group. How can
I test if the primary group is the group I'm looking for ?

Any example will be welcomed.
Thanks in advance.

Albert



Relevant Pages

  • Re: How to determine if a user is member of a group
    ... This works fine and if an invalid user or ... Now I'd like to test if the user belongs to a particular ... I test if the primary group is the group I'm looking for? ... I'm using the NT interface as an example so you can simply replace it with your LDAP AD reference: ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: How to determine if a user is member of a group
    ... No it won't, the primary group is not returned by the "Groups" native method, nor is it included in the list returned by the ... done using LDAP. ... Now I'd like to test if the user belongs to a particular ... The DirectoryEntry "memberof" lists all the groups to ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: Retrieving Roles
    ... you can retrieve the roles of the user by using LDAP - wait until Joe Kaplan ... >> my application based on the groups which the user belongs. ... >> using a custom Login page and not windows integrated authentication. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • LDAP: selective accounts on hosts
    ... particular hosts with NIS is to use either netgroups or the user's ... primary group through entries in passwd: ... The same thing can be done if the LDAP is the back-end store. ...
    (comp.unix.solaris)
  • Re: How to determine if a user is member of a group
    ... RID of the "Domain Users" group well-known SID. ... Note that the primary group id is a Posix thing and is not used in the context of AD. ... "membersOf" includes ALL groups the user is an explicit member of, but this doesn't necessarily includes the primary group. ... > which the user belongs, ...
    (microsoft.public.dotnet.framework.aspnet.security)

Loading