------------------------------------------------------------------------ #!/bin/sh ENCRYPTED_KEY_FILE=/mnt/usb-stick/key MAPPER_DEVICE=crypto_usb ENCRYPTED_DEVICE=/dev/hda2 ask_password='zenity --entry --hide-text --title="Password" --text="Please enter your password:' cat "$ENCRYPTED_KEY_FILE" | echo $(openssl aes-256-ecb -d -pass pass:$(ask_password) 2>$TMP_ERR_FILE ) | cryptsetup -v create "$MAPPER_DEVICE" "$ENCRYPTED_DEVICE" ---------------------------------------------------------------------- this is a small script which is run by udev, when I put my usb-stick in th usb slot. "ask_password" is actually your password, but I tell here my script to run "zenity" which will ask me to enter password. if you do not use gnome, you can use "kdialog" instead of "zenity". to make an encrypted key file, use these lines if you do no have your way. the variables $MAPPER_DEVICE, $ENCRYPTED_DEVICE and $ENCRYPTED_KEY_FILE are from the script above: #!/bin/sh KEY=`tr -cd [:graph:] < /dev/urandom | head -c 79` echo $KEY | cryptsetup create $MAPPER_DEVICE $ENCRYPTED_DEVICE mkreiserfs /dev/mapper/$MAPPER_DEVICE echo $KEY | openssl aes-256-ecb > "$ENCRYPTED_KEY_FILE" M. --------------------------------------------------------------------- dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/ To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx For additional commands, e-mail: dm-crypt-help@xxxxxxxx