Author: SecMaker | Posted on: 12/27/2008 12:41:41 PM | Views : 417

Hi everyone,
I just wonder if it's possible to let a Domain USER to change his own settings in his Active Directory user account
through DirectoryService in .NET ?

As a Domain ADMIN there's no problem to change another users object in Active Directory, example:


DirectoryEntry entry = new DirectoryEntry(myLDAPValue");
entry.Properties["userAccountControl"].Value = newValue;
entry.CommitChanges();

The error message I get when I run this as a Domain USER is:
"General access denied error at System.DirectoryServices.Interop.UnsafeNativeMethods.IAds.SetInfo()".
And it's obvious that a Domain USER not has access to make this kind of action.
I've even tried to impersonate the current user, but it still doesn't work.

So my question again:
Is it possile to use some kind of security class in .NET (i.e. DirectoryServicesPermission Class) to fix
this problem, OR do I ha ...

Go to the complete details ...