UJP - 技術情報

Life is fun and easy!

不正IP報告数

Okan Sensor
 
メイン
ログイン
ブログ カテゴリ一覧

     

バッチで大量のユーザorグループを作成 〜addusers.exe〜


バッチで大量のユーザorグループを作成

〜addusers.exe〜


0.改定履歴

  • 1998.08.03 初版

1.はじめに

 このドキュメントは,WindowsNTでユーザおよぶグループをバッチで操作するツール,adduser.exeの紹介を行う.

 このツールを使うことにより,次のような事が出来る.

  • 現在登録されているユーザおよびグループ情報をテキストファイルに保存する.(パスワードは不可)
  • 大量のユーザおよびグループを追加する.
  • 大量のユーザおよびグループを削除する.

 例えば,新規にNTを導入する際にユーザを沢山作成しなければならないときなどに適している.

 adduser.exeは,NT4.0リソースキットに付属している.

2.リファレンス

d:\toNT>addusers /?
Adds, Writes, or Erases accounts as specified by a delimited file.

ADDUSERS [/?] [\\computername [[/c | /d | /e] filename]] [/s:?]

  /?    Display this help screen.
  /c    Create accounts specified in the file.
  /d    Write current accounts to the specified file.
  /e    Erase user accounts specified in the file.
  /s:?  Sets the seperator character for the input/output file.  Replace the
        ? with the character to be used for seperating fields. (eg /s:~)
        Note: The seperator character is a comma ',' by default.

For detailed information please refer to the Resource Kit Help file.

d:\toNT>

3.オプション説明

オプション 説明
/?  ヘルプを表示する.
/c  ファイルから,情報を読み込み,ユーザあるいはグループを作成する.
/d  現在登録されているユーザおよびグルー=ぷの情報をファイルに書き出す.
/e  ファイルから,情報を読み込み,ユーザあるいはグループを作成する.
/s:  ファイルの区切り文字を設定する. 標準はカンマである.

4.実行サンプル

 ユーザの情報を記述したファイルを,/cオプションを付けて起動すると,次のようにユーザが作成される.

ユーザ追加のサンプル
d:\toNT>type eee.txt
[User]
addmini,,,,,,
user01,User 01,pass,,,,

d:\toNT>addusers /c eee.txt
User account created:  "addmini"
User account created:  "user01"

5.書式

 追加(/c)および削除(/e)を行なう際には,次のような書式でファイルを作成する.

ファイルの書式
[Users]
<ユーザー名>,<フルネーム>,<パスワード>,<ホームドライブ>,
<ホームパス>,<ユーザープロファイル>,<ログオンスクリプト>
[Global]
<グローバルグループ名>,<コメント>,<所属するメンバー>, ...
[Local]
<ローカルグループ名>,<コメント>,<所属するメンバー>, ...

広告スペース
Google