====== htpasswd - ベーシック認証ファイルの作成・更新 ====== ===== .htpasswd ファイルの作成 ===== $ htpasswd -c /path/to/.htpasswdfile username ===== .htpasswd ファイルへのユーザー追加 ===== $ htpasswd /path/to/.htpasswdfile username ===== .htpasswd ファイルのユーザー削除 ===== $ htpasswd -D /path/to/.htpasswdfile username ===== ランダムパスワードの生成 ===== mkpasswd コマンドが存在しない場合はパッケージをインストールする。 # yum install expect ランダムパスワードの生成(記号なし) $ mkpasswd -s 0 -2 ry2PdlC8f ランダムパスワードの生成(記号あり) $ mkpasswd -s 2 -2 1ug0F]gL% ランダムパスワードの生成(桁数指定) $ mkpasswd -l 16 -s 2 -2 iz7ah6\amtYqkSi! ===== 参考文献 ===== [[http://www.kunitake.org/fswiki/static/htpasswd.html|htpasswd コマンドの使い方 - KUNITAKE's Wiki]]\\ [[http://dolphin.c.u-tokyo.ac.jp/manual-ja/programs/htpasswd.html|Manual Page: htpasswd - Apache HTTP Server]]\\ [[http://www.atmarkit.co.jp/flinux/rensai/linuxtips/889mkpasswd2.html|任意の文字数でパスワードをランダム生成するには - @IT]]\\