Custom login/lock screen in OS X Mavericks

后端 未结 1 1147
生来不讨喜
生来不讨喜 2020-12-09 13:31

I\'m trying to override the default login/lock screen in OS X to allow the user to login in other way than providing a password (think fingerprint scanner or how \"Knock to

相关标签:
1条回答
  • 2020-12-09 14:29

    I found a way to edit the database - at first, I tried direct /var/private/db/auth.db sqlite modifications, but it didn't work, so after some time I managed to do this easier than I thought I will:

    1. security authorizationdb read system.login.console > outfile.plist

    2. After this, you need to modify the resulting outfile.plist as it's said in the NullAuthPlugin readme:

      <key>mechanisms</key>
        <array>
          <string>NameAndPassword:invoke</string>
      

      (the last line is the one you need to add to the file).

    3. Then, to save it to the database:

      security authorizationdb write system.login.console < outfile.plist

    Then the changes should be visible on any login/lock screen of your system, but be careful!

    You will not be able to authenticate with current version of NameAndPassword example!

    Be sure to estabilish a working SSH connection to your Mac before you modify the database, so you will be able to revert the changes using other device (just repeat the db modification process but this time remove the line you added before).

    0 讨论(0)
提交回复
热议问题