(O+P)ut

アウトプット



(O+P)ut

エンジニアのアウトプット

【VMWare/ESXi】Security.PasswordQualityControlにおけるmin/disable/7の意味

スポンサーリンク

はじめに

ESXiではSecurity.PasswordQualityControlのオプションを使用して各ユーザのパスワード文字数や文字の種類の要件を変更できます。本記事ではESXiホストの/etc/pam.d/passwdにデフォルトで設定されている値である以下の値の意味を解説します。

password   requisite    /lib/security/$ISA/pam_passwdqc.so retry=3 min=disabled,disabled,disabled,7,7
環境情報
  • VMware ESXi 6

Security.PasswordQualityControlの読み方

同項目は「pam_passwdqc」というマニュアルで管理していてマニュアル上では以下のようにN0~N5で値を埋めるよう指示されています。

min=N0,N1,N2,N3,N4

冒頭に記載した以下に当てはめるとN0=N1=N3=disable, N3=N4=7となります。

min=disabled,disabled,disabled,7,7

ここからはそれぞれの数値の意味ですが、N0は1つの文字クラスの文字のみで構成されるパスワードに関する設定項目で、disabledは長さに関係なくNGを指し、N1は2つの文字クラスの場合でこちらもdisabledはNG。ちなみに文字クラスは「数字」「小文字」「大文字」「記号」で分類されています。

N2はパスフレーズ(意味のある辞書後)に関する設定項目でdisabledはNG。

N3とN4はそれぞれ3文字クラスと4文字クラスのパスワードの最小文字数、7というのは最小で7文字であることを指します。

よって

min=disabled,disabled,disabled,7,7

は「3文字クラスまたは4文字クラスでパスワードは7桁以上にしないとNG」であることを指しています。

実機上での変化

min=disabled,disabled,disabled,7,7の場合にpasswdコマンドを押下すると

# passwd
...
A valid password should be a mix of upper and lower case letters,digits, and other characters.  You can use a 7 character long password with characters from at least 3 of these 4 classes. 
An upper case letter that begins the password and a digit that ends it do not count towards the number of character classes used.

表示されますがmin=disabled,disabled,disabled,disable,7のように3文字クラスもNGとすると

A valid password should be a mix of upper and lower case letters, digits, and other characters.  You can use an 7 character long password with characters from all of these classes.  
An upper case letter that begins the password and a digit that ends it do not count towards the number of character classes used.

となります。

終わりに

数字が入ったりdisabledが入ったりするのでややこしいですが、特定の条件の文字列の最小文字数が明記されています。一般的には3文字クラスもNGとするため以下のように最後の列のみ数値が入っている設定値で運用されているイメージがあります。

min=disabled,disabled,disabled,disable,7

以上、ご参考になれば幸いです。