Migrating Root Certificate Authority from Windows 2008 R2 DC to another Windows 2008 R2 DC
This article provides guidance for migrating a Root certificate authority (CA) from a windows 2008 R2 Domain Controller to another Windows Server 2008 R2 Domain controller.
- Backup CA database and private key
- Removing the CA role from the source machine
- Installing CA role in destination machine using backed up private key
- Restoring CA database
- Configuring Type 2 Certificate Template
- Configuring Autoenrollment
NOTE: Source and destination machine names can be different, but the CA name must remain same.
Backup Certificate Authority database and private key:
You can back up the CA database and private key by using the Certification Authority snap-in or by using Certutil.exe at a command prompt. 1. These are issued certificates-
2. We will be backing up CA database using CA snap-in
- Select Private Key and CA certificate along with CA database and logs
- You need to secure the private key using password
- After completing backup steps, the Active Directory Certificate Services service (Certsvc) should be stopped to prevent issuance of additional certificates. Before adding the CA role service to the destination server, the CA role service should be removed from the source server.
Removing CA Role from Source Machine:
It is important to remove the Certificate Authority (CA) role service from the source server after completing backup procedures and before installing the Certificate Authority (CA) role service on the destination server. Enterprise CAs and standalone CAs that are domain members store in Active Directory Domain Services (AD DS) configuration data that is associated with the common name of the CA. Removing the CA role service also removes the CA’s configuration data from AD DS. Because the source CA and destination CA share the same common name, removing the CA role service from the source server after installing the CA role service on the destination server removes configuration data that is required by destination CA and interferes with its operation.
- Remove the role from server manager wizard
- Restart the machine to complete the removal
Note: Copy the CA Backup folder to the destination computer
Install Certificate Authority (CA) Role on the Destination Domain Controller:
- Install the CA Role from Server Manager 2. Select Enterprise >> click Next >> ROOT CA 3. Select Use existing Private Key along with Select a certificate and use associated private key
4. Import the certificate file (PFX) from the backup folder and enter credentials you used earlier to secure the file.
5. Select default settings and install the Role
- After Installation please verify the ROOT certificate must get imported into the computer’s certificate store along with its private key.
Restoring the CA database and configuration on the destination server
- Log on to the destination server by using an account that is a CA administrator.
- Start the Certificate Authority snap-in.
- Right-click the node with the CA name, point to All Tasks, and then click Restore CA.
- On the Welcome page, click Next.
- On the Items to Restore page, select Certificate database and certificate database log.
- Click Browse. Navigate to the parent folder that holds the Database folder (the folder that contains the CA database files created during the CA database backup). (Note: Do not select the Database folder. Select its parent folder)
- Click Next and then click Finish.
- Click Yes to start the CA service (certsvc).
- Verify all the settings are restored.
NOTE: We won’t be using the CDP and AIA path of source server, CDP and AIA publishing path will point to the current server (restored server) automatically, as variable is used to calculate the server name. All the certificates issued onwards will be having CRLs published to restored server’s LDAP location.
Following is the certificate issued by source server (DC01) having CRL publishing location set to source server. We need to override the issued certificates from source server with the new certificates issued by destination (restored) server. We need to configure auto enrollment on TYPE 2 certificate for the templates which were used by source CA.
Configuring Type 2 Certificate template:
Following are the original templates used by source Certificate Authority (CA) and we need to create Type-2 certificate templates (also known as duplicate templates) in order to supersede the original templates.
Configuring Type 2 Templates:
- Right Click Certificate Templates >> Manage
- Right Click the Template and Click Duplicate Template
3. Select Windows server 2008 template, as we don’t have any issuing CA running earlier version OS.
5. Click Superseded Templates and Add original template
6. Select Auto Enrollment for Domain Users
7. Click OK and close the Certificate Template window.
9. Configure Auto Enrollment in Group Policy for Users with following settings
10. Click OK.
12. Similarly we can replace other Computer and Domain Controller certificate Templates.