Help Center/ Bare Metal Server/ User Guide (Paris Region) / FAQs/ OS FAQs/ How Do I Change the SID of a Windows Server 2012 BMS?
Updated on 2022-02-22 GMT+08:00

How Do I Change the SID of a Windows Server 2012 BMS?

Scenarios

A Security Identifier (SID) is a unique value that identifies a user, group, or computer account (administrator account). When an account is created for the first time, a unique SID is assigned to each account on the network. A SID is determined by the computer name, current time, and CPU use time of the current user-mode thread.

A complete SID contains:

  • User and group security description
  • 48-bit ID authority
  • Revision level
  • Variable sub-authority values

An example SID is S-1-5-21-287469276-4015456986-3235239863-500.

S

1

5

21-287469276-4015456986-3235239863

500

The string is a SID.

SID version

SID authority, which is NT in this example

SID sub-authorities

Accounts and groups in the domain

Currently, all the Windows Server 2012 BMSs have the same SID. In the cluster deployment scenario, you need to change the SID of the BMSs to ensure that each BMS uses a unique SID.

Procedure

  1. Log in to the BMS OS.
  2. Click in the lower left corner, choose Windows PowerShell, and run the whoami /user command to query the SID.
    Figure 1 Querying the original SID
  3. Modify the Cloudbase-Init configuration files.
    1. Open the cloudbase-init.conf and cloudbase-init-unattend.con files in the C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf directory.
    2. Add first_logon_behaviour=no to both files.
      [DEFAULT]
      username=Administrator
      groups=Administrators
      first_logon_behaviour=no
      netbios_host_name_compatibility=false
      metadata_services=cloudbaseinit.metadata.services.httpser
      inject_user_password=true
      ...
    3. Delete cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin from the cloudbase-init-unattend.conf file.

  4. Open the CLI and enter the following command to open the Sysprep window:
    C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf> C:\Windows\System32\Sysprep\sysprep.exe /unattend:Unattend.xml
  5. In the System Preparation Tool 3.14 dialog box, configure parameters and click OK.
    Figure 2 System Preparation Tool settings
  6. After the configuration is complete, the BMS automatically restarts. You need to encapsulate and decompress the package again. After the BMS restarts, you need to reset the password for the Windows OS. Contact the customer service.
  7. Log in to the BMS OS and check the SID using the method in 2.
    Figure 3 Querying the new SID

    As shown in the preceding figure, the SID has been changed successfully.