
April 15th, 2002, 02:02 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
How do I change primary group for a user programmatically
<i><b>Originally posted by : Staffan (staffan@edgepeople.net)</b></i><br />I want to change a newly created user's primary group programmatically, but I don't know how to do it. <br />When I add a new user to a domain then, by default, the user will become a member of the Domain Users group. I put the user in the Domain Guests group and want to remove the user from the Domain Users group. However, this can't be done since the Domain Users group is the primary user group.<br />I tried to get hold of the security descriptor and set the group property to the desired group. The security descriptor changes and everything seems fine, but the user still has Domain Users as primary group.<br />Is there anyone who can help me solve the problem?
|