2013年5月2日木曜日

Windows Server 2003/2008 ドメインコントローラのコンピュータ名の変更方法


対象OS
Windows2003
Windows2008



概要

運用中のドメインコントローラ(DC)のホスト名変更方法である。

ホスト名変更には、いくつかの方法がある。
一般的なPCと同様、GUIからホスト名変更も可能だが、ドメインコントローラから降格/昇格する必要があり、手間が掛かる上、
サイトの構成によってサーバを利用できない時間が発生ため、あまりお勧めしない。


前提条件

作業に入る前に確認する内容は以下である。

  • Windows2003の場合、サポートツールがインストールされていること(Windows2008はデフォルトで入っている)
  • ドメイン機能レベルは Windows Server 2003 に設定されていること(Windows2003の場合)
  • FSMO、GCの確認
  • DNS、DHCPなどの機能確認
  • 過去にDCとして同じ名前で登録されていた場合、消えていない設定は手動で削除する必要がある。昇格/降格をやっていない場合、


設定変更


変更する設定例は、以下とする。

 変更前FQDN: WIN2K3SP1-DCX.dc-test.local
 変更後FQDN: WIN2K3SP1-DC2.dc-test.local


コマンドプロンプトを開いて以下コマンドを実行する。

cmd> hostname
WIN2K3SP1-DCX


cmd> netdom computername %computername% /enum     ・・・ コンピュータ名表示
All of the names for the computer are:

WIN2K3SP1-DCX.dc-test.local
The command completed successfully.


cmd> netdom computername %computername% /add:WIN2K3SP1-DC2.dc-test.local     ・・・  ホスト名追加
Successfully added WIN2K3SP1-DC2.dc-test.local
as an alternate name for the computer.

The command completed successfully.




cmd> netdom computername %computername% /enum
All of the names for the computer are:

WIN2K3SP1-DCX.dc-test.local
WIN2K3SP1-DC2.dc-test.local
The command completed successfully.


cmd> netdom computername %computername% /makeprimary:WIN2K3SP1-DC2.dc-test.local   ・・・  優先順位の変更
Successfully made WIN2K3SP1-DC2.dc-test.local
the primary name for the computer. The computer must be rebooted for this name
change to take effect. Until then this computer may not be able to authenticate
users and other computers, and may not be authenticated by other computers in
the forest. The specified new name was removed from the list of alternate
computer names. The primary computer name will be set to the specified new
name after the reboot.


cmd> shutdown -r -t 0  ・・・  OS再起動


再起動後、コマンドプロンプトを開く




cmd> hostname
WIN2K3SP1-DC2


cmd> netdom computername %computername% /enum
All of the names for the computer are:

WIN2K3SP1-DC2.dc-test.local
WIN2K3SP1-DCX.dc-test.local
The command completed successfully.


cmd> netdom computername %computername% /remove:WIN2K3SP1-DCX.dc-test.local      ・・・  旧ホスト名削除
Successfully removed WIN2K3SP1-DCX.dc-test.local

as an alternamte name for the computer.

The command completed successfully.


cmd> netdom computername %computername% /enum
All of the names for the computer are:

WIN2K3SP1-DC2.dc-test.local
The command completed successfully.




※Windows2003の場合は、上記作業だけでは一部設定が変更されないため、 こ ちらを参照

「netdom」のヘルプはこちらを参照

0 件のコメント:

コメントを投稿