1f08c3bdfSopenharmony_ciMMC Password Protection Reference UI 2f08c3bdfSopenharmony_ci------------------------------------ 3f08c3bdfSopenharmony_ci 4f08c3bdfSopenharmony_ciThis is a simple text-mode reference UI for the MMC password protection 5f08c3bdfSopenharmony_cisupport, written in shell script. It's very simple and does not hash nor cache 6f08c3bdfSopenharmony_cipasswords. 7f08c3bdfSopenharmony_ci 8f08c3bdfSopenharmony_ciIt's composed of the following files: 9f08c3bdfSopenharmony_ci 10f08c3bdfSopenharmony_ci- ask_password.sh: get the password from userspace. It's called when unlocking 11f08c3bdfSopenharmony_ci the card or assigning a new password to an unlocked card. 12f08c3bdfSopenharmony_ci- change_password.sh: used to change the password from a unlocked card. 13f08c3bdfSopenharmony_ci- forced_erase.sh: used to force-erase a card, usually when the user has forgot 14f08c3bdfSopenharmony_ci the password and wants to unlock the card. NOTE: all the card's contents are 15f08c3bdfSopenharmony_ci lost when using this option! It only works for _locked_ cards. 16f08c3bdfSopenharmony_ci- remove_password.sh: used to remove the passwor from a card previously unlocked. 17f08c3bdfSopenharmony_ci 18f08c3bdfSopenharmony_ciSetting up 19f08c3bdfSopenharmony_ci---------- 20f08c3bdfSopenharmony_ci 21f08c3bdfSopenharmony_ci1) Install the keyutils package available from http://people.redhat.com/~dhowells/keyutils/ 22f08c3bdfSopenharmony_ci2) Install this package: 23f08c3bdfSopenharmony_ci 24f08c3bdfSopenharmony_ci 25f08c3bdfSopenharmony_ci2) Add the following lines to /etc/request-key.conf (remember to remove any 26f08c3bdfSopenharmony_ciprevious mmc lines): 27f08c3bdfSopenharmony_ci 28f08c3bdfSopenharmony_cicreate mmc mmc:key unlock /usr/share/keyutils/ask_password.sh %k %S 29f08c3bdfSopenharmony_cicreate mmc mmc:key assign /usr/share/keyutils/assign_password.sh %k %S 30f08c3bdfSopenharmony_ci 31f08c3bdfSopenharmony_ciUsing it 32f08c3bdfSopenharmony_ci-------- 33f08c3bdfSopenharmony_ci 34f08c3bdfSopenharmony_ci1) Unlocking a card: 35f08c3bdfSopenharmony_ci 36f08c3bdfSopenharmony_cikeyctl request2 mmc mmc:key unlock 37f08c3bdfSopenharmony_ci 38f08c3bdfSopenharmony_ci2) Assigning a password to an unlocked card: 39f08c3bdfSopenharmony_ci 40f08c3bdfSopenharmony_cikeyctl request2 mmc mmc:key assign 41f08c3bdfSopenharmony_ci 42f08c3bdfSopenharmony_ci3) Changing the password (card must be unlocked first): 43f08c3bdfSopenharmony_ci 44f08c3bdfSopenharmony_ci/usr/share/keyutils/change_password.sh 45f08c3bdfSopenharmony_ci 46f08c3bdfSopenharmony_ci4) Removing the password (card must be unlocked first): 47f08c3bdfSopenharmony_ci 48f08c3bdfSopenharmony_ci/usr/share/keyutils/remove_password.sh 49f08c3bdfSopenharmony_ci 50f08c3bdfSopenharmony_ci5) Force erase card (card must be LOCKED): 51f08c3bdfSopenharmony_ci 52f08c3bdfSopenharmony_ci/usr/share/keyutils/force_erase.sh 53f08c3bdfSopenharmony_ci 54f08c3bdfSopenharmony_ciContact Info 55f08c3bdfSopenharmony_ci------------ 56f08c3bdfSopenharmony_ci 57f08c3bdfSopenharmony_ciAny comments or suggestions regarding these scripts should be sent to: 58f08c3bdfSopenharmony_ci 59f08c3bdfSopenharmony_ciAnderson Briglia <anderson.briglia@indt.org.br> 60f08c3bdfSopenharmony_ciAnderson Lizardo <anderson.lizardo@indt.org.br> 61f08c3bdfSopenharmony_ciCarlos Eduardo Aguiar <carlos.aguiar@indt.org.br> 62