AD ortamında sanırım hiç bir admin SID çakısması olsun istemezler. Peki bunun kontrolünü nasıl yapabiliriz?
Bunun için çeşitli tool’lar var. Psgetsid de bunlardan biri. Ama amacınız tüm AD yapınızı konrol etmek ise aşağıdaki komutu önerebilirim.
dsquery * -filter “(objectcategory=computer)” -attr objectsid -limit 10000 >sid.txt
10000 yerinde AD’de bulunan bilgisayar hesabı sayısına göre artırabilirsiniz. Komutu çalıştırdığınızda sid.txt isminde bir çıktı verecek. Bu çıktıyı Exel’e atarak koşullu biçimlendirme özelliğini kullanarak aynı olan SID’leri görüntüleyebilirsiniz. Sonra elde ettiğiniz SID hangi bilgisayara ait bunu tespit etmeniz gerekecek. Bu işide bu tool’u kullanarak yapabilirsiniz.
Bu işin uzun yoluydu J
Kısa yol şu şekilde
To start Ntdsutil:
- Click Start, and then click Run.
- In the Open box, type ntdsutil, and then press ENTER.
Look for a Duplicate SID
- At the Ntdsutil command prompt, type security account management, and then press ENTER.
- At the Security Account Maintenance command prompt, type connect to server DNSNameOfServer, and then press ENTER. Connect to the server that stores your SAM database.
- At the Security Account Maintenance command prompt, type check duplicate sid, and then press ENTER. A display of duplicates appears.
Clean Up a Duplicate SID
- At the Ntdsutil command prompt, type security account management, and then press ENTER.
- At the Security Account Maintenance command prompt, type connect to server DNSNameOfServer, and then press ENTER. Connect to the server that stores your SAM database.
- At the Security Account Maintenance command prompt, type cleanup duplicate sid, and then press ENTER. Ntdsutil confirms the removal of the duplicate.
- At the Security Account Maintenance command prompt, type q, and then press ENTER.
- When you are finished with Ntdsutil, type q, and then press ENTER.