Re: Add/Remove Groups
Shawn Wildermuth <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.cx |
|---|---|
| Message-ID | <00c301c6c08f$5ef81210$02010a0a@theadoguy> |
DirectoryServices work both in Domain and non-Domain systems. Thanks, Shawn Wildermuth Wildermuth Consulting Services, LLC http://adoguy.com C# MVP, MCSD.NET, Author and Speaker > -----Original Message----- > From: Discussion relating to the specifics of the C# and > Managed C++ languages [mailto:[email protected]] > On Behalf Of Mont Rothstein > Sent: Tuesday, August 15, 2006 12:55 PM > To: [email protected] > Subject: Re: [DOTNET-CX] Add/Remove Groups > > I had missed the ability to edit a DirectoryEntry and commit > the changes. I now think I should be able to add/remove > users from a group this way. > > I had hoped to be able to also provide this functionality on > standalone computers not part of a domain, but at this point > I am not sure that is possible. > > Thanks, > -Mont > > > On 8/14/06, Shawn Wildermuth <[email protected]> wrote: > > > > If you use System.DirectoryServices, it should be simplier > that that. > > But I don't have example code with me. > > > > > > Thanks, > > > > Shawn Wildermuth > > Wildermuth Consulting Services, LLC > > http://adoguy.com > > C# MVP, MCSD.NET, Author and Speaker > > > > > > > -----Original Message----- > > > From: Discussion relating to the specifics of the C# and > Managed C++ > > > languages [mailto:[email protected]] > > > On Behalf Of Mont Rothstein > > > Sent: Monday, August 14, 2006 8:41 PM > > > To: [email protected] > > > Subject: [DOTNET-CX] Add/Remove Groups > > > > > > I want to be able to add and remove groups from users (or > users from > > > groups depending on your perspective) from within a .NET > > > application. The users will be part of a domain and the user > > > wanting to add/remove groups will be an admin. > > > > > > I can find the user name and SID by searching the > directory server, > > > but I can't figure out how to add/remove the groups. > > > > > > I can use LogonUser() to get the access token, and then get the > > > WindowsIdentity(), but that requires that I have the user's > > > password. > > > > > > Does anyone know how to do this without having each > user's password? > > > > > > Thanks, > > > -Mont > > > > > > =================================== > > > This list is hosted by DevelopMentorR http://www.develop.com > > > > > > View archives and manage your subscription(s) at > > > http://discuss.develop.com > > > > =================================== > > This list is hosted by DevelopMentor(r) http://www.develop.com > > > > View archives and manage your subscription(s) at > > http://discuss.develop.com > > > > =================================== > This list is hosted by DevelopMentorR http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com