#author("2020-08-05T23:44:26+00:00","default:sysosa","sysosa")
#author("2020-08-05T23:48:03+00:00","default:sysosa","sysosa")
&color(green){Windows Server 2019 Essentials};で作ったActiveDirectoryにユーザを登録します

ただし単なるユーザ登録ではなく uid/gid を持ってLinux環境にログインできるユーザを作ります

以前は「Server for NIS Tools」でwindowsServerのADUC[Active Directory User and Computers]からuid/gidが
定義できていたのですがwindowsServer2016から廃止されてしまった。

っでその回避方法ですが、ActiveDirectoryへの通常のユーザ登録を行った後で属性エディターでattribute を変更します。

まずはwindowsServerにてユーザを登録します. 
&ref(2020y08m05d_195012561.png,nolink);&ref(2020y08m05d_200028401.png,nolink);
その際の入力値は下記のように反映されます
|          |>|>|>|>|>|>|>|>|>|>|BGCOLOR(BLUE):&COLOR(WHITE){windows};|
|BGCOLOR(YELLOW):attribute|BGCOLOR(YELLOW):name&br;ユーザーID|BGCOLOR(YELLOW):sAMAccountName&br;ユーザーログオン名|BGCOLOR(YELLOW):Displayname&br;表示名|BGCOLOR(YELLOW):sn&br;姓|BGCOLOR(YELLOW):givenname&br;名|BGCOLOR(YELLOW):initials&br;イニシャル|BGCOLOR(YELLOW):description&br;説明|BGCOLOR(YELLOW):physicalDeliveryOfficeName&br;事務所|BGCOLOR(YELLOW):telephoneNumber&br;電話番号|BGCOLOR(YELLOW):mail&br;電子メール|BGCOLOR(YELLOW):wWWWHomePage&br;Webページ|
|入力値|Einzbern von Irisviel|airi|Einzbern von Irisviel|Einzbern|Irisviel||アイリ師匠|おねがい!アインツベルン相談室|XXXX-XXXXXX|YYYY@YYYYY|hogehoge|
|BGCOLOR(YELLOW):備考|>|初期値変更不可||||||||||

その後に

***attributeの追加 [#q4d5a621]
/etc/passwdに相応となる項目は下記になります
||>|>|>|>|>|BGCOLOR(GREEN):&COLOR(WHITE){posixAccount(/etc/passwd)};|
|BGCOLOR(YELLOW):attribute |BGCOLOR(YELLOW):uid|BGCOLOR(YELLOW):uidNumber|BGCOLOR(YELLOW):gidNumber|BGCOLOR(YELLOW):gecos|BGCOLOR(YELLOW):unixHomeDirectory|BGCOLOR(YELLOW):loginShell|
|BGCOLOR(YELLOW):備考|sAMAccountNameと同じに|ユニーク値に||Displaynameと同じに|/home/<uid>|/bin/bash|

なので属性エディターを使って下記のように修正します

&ref(2020y08m05d_201936361.png,nolink);
&ref(2020y08m05d_202054472.png,nolink);
&ref(2020y08m05d_202153192.png,nolink);
&ref(2020y08m05d_202305344.png,nolink);
&ref(2020y08m05d_202428332.png,nolink);
&ref(2020y08m05d_202520632.png,nolink);

***Groupの場合 [#j33342fe]
groupも同様に属性エディターで attribute「gidNumber」でgidを定義します


***一括でユーザ登録したい [#w672640b]
恐らくADへテキストファイルを読ませてユーザ登録ができるかと思うが、、


***ホームディレクトリ [#i786f17a]
windowsPCにてコマンドプロンプト(cmd)を起動した際、どこにいるかは
-ADドメインに参加していない
「&color(orangered){C:\Users\<ユーザ名>};」
-ADドメインに参加なら
「attribute」の「homeDirectory」(ホームフォルダーにて「ローカルパス」を指定なら)
or
「attribute」の「homeDirectory」と「homeDrive」(ホームフォルダーにて「接続ドライブ」を指定なら)
&color(red){*};&size(10){環境変数「%USERNAME%」で代用することも可能};

で定められる。
&ref(2020y08m06d_084316696.png,nolink);
1

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS