next up previous contents
Next: 11.2.2 グループファイルの書き方 Up: 11.2 ユーザとグループ Previous: 11.2 ユーザとグループ

11.2.1 htpasswd

Apacheには、こうしたパスワード・ファイルを管理するコマンドhtpasswdが、 サポートプログラムとして用意されています。
(defaultでは /usr/local/apache/bin にインストールされている )

# PATH=$PATH:/pub/usr/local/apache/bin;export PATH
# htpasswd                    <--- 引数無しで起動するとヘルプ

Usage: htpasswd [-c] passwordfile username
The -c flag creates a new file.
# htpasswd -c users user1 <--- users という名前のファイルを作り
Adding password for user1.           ユーザ user1を登録
New password:
Rectangle-type new password:
# htpasswd users user2    <--- ファイル users にユーザ user2を追加
Adding user user2
New password:
Rectangle-type new password:
#



Noriyo Kanayama