まめぞうの技術メモ

IT関連で勉強したことをメモします

WindowsServer2016でActiveDirectoryを立ててみる

日々使うのに、ActiveDirectoryの詳細を知らないので、AzureにWindowsServer2016でActiveDirectoryを立てて勉強しました。

以下の記事を参考に作成します。中段の「サーバー マネージャーを使用して AD DS をインストールする」の記載を参考に作ります。

docs.microsoft.com

Server ManagerでActiveDirectory Domain Services をインストール

サーバにログインしたら、Server Managerが立ち上がっているので、早速ActiveDirectory Domain Services をインストールします。

右上のManage -> Add Roles and Features をクリックします。

Add Roles and Featuresをクリックします

Installation Typeで、Role-based or feature-based installationを選択。

Role-based or feature-based installation

サーバー選択画面。今回は自分のサーバを選択。

サーバー選択画面

ServerRolesで「Active Directory Domain Services」を選択。

Active Directory Domain Servicesを選択

Add Featuresをクリック。

Add Featuresをクリック

あとは、Nextボタンを押していって、最後のConfirmation画面で「Install」を押すとインストールが始まります。

Install画面

完了したらCloseで閉じる。

ドメインコントローラへ昇格

その後、Server Managerの右上の旗マークをクリックし、「Promote this server to a domain controller」をクリックして、このサーバーをドメインコントローラに昇格します。

ドメコンに昇格

今回は新規にドメインを作ってみます。

Add a new forest を選択し、作成するドメイン名を入力します。今回は適当に「test.internal」というドメインを作成します。Root domain name にドメイン名を入れます。

Add a new forest を選択し、作成するドメイン名を入力

Passwordを入力します。

Passwordを入力します。

今回は、他の項目は変更せず、Prerequisites CheckまでいってInstallを押します。

Installを押す

サーバーの再起動がかかるので、一度強制ログアウトされます。

ちょっと驚きます。

ドメインコントローラの状態を確認

しばらく(5分~10分)待ってから、先程設定を行っていたユーザーでログインします。

ログインしたら、Control Panel -> Administrative Tools -> Active Directory Users and Computersを起動します。

Active Directory Users and Computersを起動

ドメインユーザーの作成・RemoteDesktop権限追加

起動したら適当にユーザーを作ってみます。

適当にユーザーを作成

また、よく引っかかるのですが、RemoteDesktop権限がないとリモートログインできません。

Control Panel -> System から、左メニューのRemote settings -> Select Users で、下の画面のように先程作ったドメインユーザーを追加してください。

RemoteDesktop権限追加

今作ったユーザー(testuser@test.internal)でログイン!

あれ。ログイン画面には行くが権限が足りない旨のメッセージが。

To sign in remotely, you need the right to sign in through Remote Desktop Services.
By default members of the Administrators group have this right. 
If the group you're in does not have the right, 
or if the right has been removed from the Administrators group, 
you need to be granted the right manually.

Administratorsグループに追加せよとのことなので、渋々追加。

Active Directory Users and Computersから対象ユーザーのプロパティを編集します。Member Ofから、Administratorsに追加してください。

Administratorsに追加

そして、再度ログイン。無事ログインできました!

無事ログインできました

今日はここまで。少し疲れました。。

作ったドメインにクライアントやサーバーを参加させる方法は、次の記事に書いてあります。

tech.mamezou00000.com