日々使うのに、ActiveDirectoryの詳細を知らないので、AzureにWindowsServer2016でActiveDirectoryを立てて勉強しました。
以下の記事を参考に作成します。中段の「サーバー マネージャーを使用して AD DS をインストールする」の記載を参考に作ります。
- Server ManagerでActiveDirectory Domain Services をインストール
- ドメインコントローラへ昇格
- ドメインコントローラの状態を確認
- ドメインユーザーの作成・RemoteDesktop権限追加
Server ManagerでActiveDirectory Domain Services をインストール
サーバにログインしたら、Server Managerが立ち上がっているので、早速ActiveDirectory Domain Services をインストールします。
右上のManage -> Add Roles and Features をクリックします。
Installation Typeで、Role-based or feature-based installationを選択。
サーバー選択画面。今回は自分のサーバを選択。
ServerRolesで「Active Directory Domain Services」を選択。
Add Featuresをクリック。
あとは、Nextボタンを押していって、最後のConfirmation画面で「Install」を押すとインストールが始まります。
完了したらCloseで閉じる。
ドメインコントローラへ昇格
その後、Server Managerの右上の旗マークをクリックし、「Promote this server to a domain controller」をクリックして、このサーバーをドメインコントローラに昇格します。
今回は新規にドメインを作ってみます。
Add a new forest を選択し、作成するドメイン名を入力します。今回は適当に「test.internal」というドメインを作成します。Root domain name にドメイン名を入れます。
Passwordを入力します。
今回は、他の項目は変更せず、Prerequisites CheckまでいってInstallを押します。
サーバーの再起動がかかるので、一度強制ログアウトされます。
ちょっと驚きます。
ドメインコントローラの状態を確認
しばらく(5分~10分)待ってから、先程設定を行っていたユーザーでログインします。
ログインしたら、Control Panel -> Administrative Tools -> Active Directory Users and Computersを起動します。
ドメインユーザーの作成・RemoteDesktop権限追加
起動したら適当にユーザーを作ってみます。
また、よく引っかかるのですが、RemoteDesktop権限がないとリモートログインできません。
Control Panel -> System から、左メニューのRemote settings -> Select Users で、下の画面のように先程作ったドメインユーザーを追加してください。
今作ったユーザー(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に追加してください。
そして、再度ログイン。無事ログインできました!
今日はここまで。少し疲れました。。
作ったドメインにクライアントやサーバーを参加させる方法は、次の記事に書いてあります。