• Home
Name Date Size #Lines LOC

..--

AUTHORSD07-Sep-2024146 43

MakefileD07-Sep-20241 KiB304

READMED07-Sep-20241.8 KiB6239

ask_password.shD07-Sep-20242.6 KiB6622

assign_password.shD07-Sep-20242.6 KiB7129

change_password.shD07-Sep-20242.8 KiB8134

force_erase.shD07-Sep-20242.9 KiB7628

remove_password.shD07-Sep-20242.5 KiB6519

README

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