Les rôles FSMO c'est quoi ? Comment transférer les rôles FSMO d'un DC
vers un autre ?
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FSMO Roles Transfer and Seizing
Merci de noter que seulement la première section est en français, le reste est en anglais, avant tout c'est la langue de la technique et du business !
Author: Abdel YEZZA Level: Intermediate/Advanced Définition du FSMOFSMO signifie Flexible Single Master Operations, autrement dit, des rôles uniques par rapport au contexte dans lequel ils opèrent et ils sont transférables. Dans toute infrastructure Microsoft basée sur Windows 2000 ou 2003, il existe 5 rôles attribués à des Contrôleurs de Domaines (DC). Deux rôles uniques dont l'étendu est la forêt entière, attribués au niveau du domaine racine (Root Domain). Les trois autres rôles opèrent au niveau de chaque domaine de la forêt (S'il y a plus d'un domaine évidemment) et sont uniques dans chaque domaine (racine, fils ou sous-arbre). Le tableau suivant résume les 5 rôles FSMO et l'étendu de chacun d'eux.
FSMO Role TransferWe will show in this section how to transfer FSMO roles from the current DC (Domain Controller) holder to another DC in the same domain. This should be done at the root domain level (forest-wide roles and domain-wide roles) as well as in child domains (only domain-wide roles) as indicated in the first section. If the transfer operation does not work, then as a last alternate solution consists in seizing the role, this action should be done with caution and only if the role is not assigned to any DC of the domain. The transfer operation can be done by many ways:
1. Using consolesAll the administration consoles can be made available by downloading and installing the Windows Administration Tools Pack AdminPack.msi from Microsoft at this address: http://www.microsoft.com/downloads/details.aspx?FamilyID=E487F885-F0C7-436A-A392-25793A25BAD7&displaylang=en.Note about the Active Directory Schema editor: If the console file name is not present in the Administration Tools Start Menu or the same folder in the Control Panal folder, add the appropriate snap-in to the MMC editor. If the snap-in is not present, you have to register the component schmmgmt.dll by executing the command-line: regsvr32 schmmgmt.dlland then reload the snap-ins dialog if necessary. The table below summarizes the FSMO roles and show how to transfer using the appropriate console as well as necessary group membership to do the transfer.
2. Using NtdsUtil utilityTransfer <FSMO-ROLE> (refer to the table below for the FSMO-ROLE holder tu use) to domain controller <DC1> using NtdsUtil:ntdsutil roles conn "co t s <DC1>" q "transfer <FSMO-ROLE>" q qExample: Transfer RID Master role to the DC DCName ntdsutil roles conn "co t s DCName" q "transfer rid master" q qThe table below indicates the expression to use for each FSMO role:
Note that the command-line using ntdsutil could be also executed in a prompt fashion by typing each command on a separate line and the used commands have been abreviated as indicated in the following table:
3. Using scripting (VBScript)The following VbScript listing contains all functions to be called to transfer FSMO roles:'///////////////////////////////////////////////// ' AUTHOR: Abdel YEZZA ' DATE : 12/02/2008 ' NOTE : NOT validated!!!! (Be aware) ' COMMENT: Transfer FSMO roles functions '///////////////////////////////////////////////// Option Explicit Function TransferSchemaRole(strNewDCOwner) TransferSchemaRole = TransferFSMORole("SchemaMaster", strNewDCOwner) End Function Function TransferNamingContextRole(strNewDCOwner) TransferNamingContextRole=TransferFSMORole("SchemaMaster", strNewDCOwner) End Function Function TransferRIDRole(strNewDCOwner) TransferRIDRole=TransferFSMORole("RidMaster", strNewDCOwner) End Function Function TransferPDCRole(strNewDCOwner) TransferPDCRole=TransferFSMORole("PDC", strNewDCOwner) End Function Function TransferInfrastructureRole(strNewDCOwner) TransferInfrastructureRole=TransferFSMORole("InfrastructureMaster", strNewDCOwner) End Function '////////////////////////////////////////////////////////// ' Transfer the role: strRole ' to the new DC owner: strNewDCOwner '////////////////////////////////////////////////////////// Function TransferFSMORole(strRole, strNewDCOwner) Dim objRootDSE Dim strNewOwner strNewOwner = strnewDCOwner ' e.g. dc2.MyDomain.com Set objRootDSE = GetObject("LDAP://" & strNewOwner & "/RootDSE") objRootDSE.Put "become" & strRole, 1 objRootDSE.SetInfo If Err.Number<>0 Then TransferFSMORole=False Else TransferFSMORole=true End if Set objRootDSE = nothing End FunctionExample: In order to transfer RID Master role to the DC DCName, make a call to the function TransferRIDRole: TransferRIDRole("DCName") FSMO roles seizingIf the transfer does not work or the role was completely lost because the DC holder is down, seizing the role is an alternative to force the role DC holder. Note that seizing is not available in standard MMC consoles and must be the last alternative to restore one the lost roles.1. Using NtdsUtil utilitySeize <FSMO-ROLE> to domain controller <DC1> using NtdsUtil:ntdsutil roles conn "co t s <DC1>" q "seize <FSMO-ROLE>" q qExample: Seize the RID master to the DC DC1 ntdsutil roles conn "co t s DC1" q "seize rid master" q qThe table below shows the expression to be used after the word seize for each role seizing:
2. Using scripting (VBScript)To be completed later... comme back next weeks |