PDA

View Full Version : MIND BUGLER - another way how to put lock/unlock in your MMC card


mind bugler
11-25-2007, 08:52
MMC Password Protection

This is a simple text-mode reference UI for the MMC password protection
support, written in shell script. It's very simple and does not hash nor cache
passwords.

It's composed of the following files:

- ask_password.sh: get the password from userspace. It's called when unlocking
the card or assigning a new password to an unlocked card.
- change_password.sh: used to change the password from a unlocked card.
- forced_erase.sh: used to force-erase a card, usually when the user has forgot
the password and wants to unlock the card. NOTE: all the card's contents are
lost when using this option! It only works for _locked_ cards.
- remove_password.sh: used to remove the passwor from a card previously unlocked.

Setting up
----------

1) Install the keyutils package available from http://people.redhat.com/~dhowells/keyutils/
2) Install this package:

# make PREFIX=/usr install

2) Add the following lines to /etc/request-key.conf (remember to remove any
previous mmc lines):

create mmc mmc:key unlock /usr/share/keyutils/ask_password.sh %k %S
create mmc mmc:key assign /usr/share/keyutils/assign_password.sh %k %S
create mmc mmc:key change /usr/share/keyutils/change_password.sh %k %S
create mmc mmc:key remove /usr/share/keyutils/ask_password.sh %k %S

Using it
--------

1) Unlocking a card:

mmc_unlock_card.sh

2) Assigning a password to an unlocked card:

mmc_assign_password.sh

3) Changing the password (card must be unlocked first):

mmc_change_password.sh

4) Removing the password (card must be unlocked first):

mmc_remove_password.sh

5) Force erase card (card must be LOCKED):

mmc_force_erase.sh


mind bugler
philippines

Zaihtam
11-28-2007, 06:12
erm... does it works on regular mmc reader?


Good Luck...