LoginSignup
4
3

More than 5 years have passed since last update.

Macでパスワードなしユーザーを作ろうと思ったら作れなかったので、設定を変更した記録

Last updated at Posted at 2019-01-03

Macを修理に出そうと思ったら、Appleの担当者にパスワードなしの管理者ユーザーを作ってくれと言われたので、作ろうと思ったらパスワードなしは弾かれてしまった。OSは10.14.2で、他の同じバージョンのMacでは作れていたため、パスワードポリシーが怪しそうだったので確認してみたらそれが原因だった。変更方法を書いておく。デフォルトはパスワードなしでも作れるっぽいが、自分は何かの時に変えてしまったのかもしれない。

スクリーンショット 2019-01-03 22.07.35.png

1. コマンドで現在の設定を取得

pwpolicy getaccountpolicies > file.plist

2. file.plistを開き、1行目のメッセージを削除(そのままだとplistとして認識されない)

Getting global account policies
...

3. 下記の正規表現を書き換える

書き換え前

<key>policyContent</key>
<string>policyAttributePassword matches '.{4,}+'</string>

書き換え後

<key>policyContent</key>
<string>policyAttributePassword matches '^$|.{4,}+'</string>

4. 設定を反映

pwpolicy setaccountpolicies file.plist
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3