Hi
I'm trying to apply the "reset password" right to a computer object in Active Directory..
To do this, i used the ActiveDS lib
Whatever i do, i get the 'The security ID is invalid
Here is my little code (in C#)
ActiveDs.IADs dsobject
ActiveDs.IADsSecurityDescriptor sd
ActiveDs.IADsAccessControlList dacl
ActiveDs.AccessControlEntry NewAce
long lflags
string ComputerPath
ComputerPath="LDAP://"+Domain.ToString()+"/CN="+ComputerName.ToString()+",OU=Just Created,OU=IT,OU=Bruxelles,OU=Belgium,OU=all computers,DC=domain,DC=com"
dsobject = dsobject.Get(ComputerPath)
sd = dsobject.Get("ntSecurityDescriptor")
dacl = sd.DiscretionaryAcl
NewAce.AccessMask="accessrights"
NewAce.AceType="accesstype"
NewAce.AceFlags="aceinheritflags"
NewAce.Trustee=UserName.ToString()
dacl.AddAce(NewAce)
sd.DiscretionaryAcl = dacl
dsobject.Put("ntSecurityDescriptor",sd)
dsobject.SetInfo()
I can't figure where's the problem... Is it the approach ? Do i have to use something else ?..
Thanks for reading :
Sneid 1 2088
You need to set the "AccessMask" bit8 (0x100) and the "ObjectType" guid
value 00299570-246d-11d0-a768-00aa006e0529 in the ACE.
Willy.
"Sneid" <sn******@hotmail.com> wrote in message
news:93**********************************@microsof t.com... Hi,
I'm trying to apply the "reset password" right to a computer object in Active Directory... To do this, i used the ActiveDS lib.
Whatever i do, i get the 'The security ID is invalid'
Here is my little code (in C#) :
ActiveDs.IADs dsobject; ActiveDs.IADsSecurityDescriptor sd; ActiveDs.IADsAccessControlList dacl; ActiveDs.AccessControlEntry NewAce; long lflags; string ComputerPath;
ComputerPath="LDAP://"+Domain.ToString()+"/CN="+ComputerName.ToString()+",OU=Just Created,OU=IT,OU=Bruxelles,OU=Belgium,OU=all computers,DC=domain,DC=com";
dsobject = dsobject.Get(ComputerPath);
sd = dsobject.Get("ntSecurityDescriptor");
dacl = sd.DiscretionaryAcl;
NewAce.AccessMask="accessrights"; NewAce.AceType="accesstype"; NewAce.AceFlags="aceinheritflags"; NewAce.Trustee=UserName.ToString();
dacl.AddAce(NewAce); sd.DiscretionaryAcl = dacl;
dsobject.Put("ntSecurityDescriptor",sd); dsobject.SetInfo();
I can't figure where's the problem... Is it the approach ? Do i have to use something else ?...
Thanks for reading :)
Sneid This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Sam |
last post by:
I have installed msde 7.0 on a pc with win98.
Someone has changed sa password
How can I reset sa password?
I'm unable to logon with trusted connection because the pc is not nt.
Thanks
|
by: Ian |
last post by:
Hi
I know there are products out there that can do this like
http://www.psynch.com/technology/ska.html
What is the code that is used to Reset a Users password so the next time
they logon to...
|
by: John Gossett |
last post by:
I have written an application in vb.net to reset user passwords in active
directory. If I run the application as a user with full contol of the AD
object I can reset the password.
If I run the...
|
by: serkan |
last post by:
Guys,
I am trying to get this password reset functionality wor for me but I am not successful at all. Please somebody help me. I get "Your password could not be reset - please try again later" so I...
|
by: Dabbler |
last post by:
My password reset emails aren't getting through so I have two problems,
getting the email to work and resetting the passwords from users who have
already missed their reset email.
My health...
|
by: Lile |
last post by:
Hello !
I have a problem:
I started a new PC, with Windows XP Pro. The first time, it asked me to define the language for region options, language, and keyboard. It offered me corespodentlly :...
|
by: shapper |
last post by:
Hello,
I placed a textbox in a web page where I ask the user for its email.
Now I need to reset its password and get the user profile for the given
email if it exists.
How can I do this?
...
|
by: jarice1978 |
last post by:
Hello,
I have been scanning the internet for a few days now. That is not working. So now it is time to post!
I have read a few other posts on here about authentication but they do not match...
|
by: Homer |
last post by:
Hi,
I want to be able to reset a user's password and I do not want to use
the PasswordRecovery control to reset and email it to the user. A
while back, I thought I'd read an article that...
|
by: DarthPeePee |
last post by:
Hello everyone.
I am working on a Password Strength Meter and I am running into 1 problem that I would like to fix.
When pressing the "Clear Password & Try Again" button, the password clears...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |