[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Using device UUSBs with cryptsetup to open already encrypted USB sticks



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The command syntax for opening such a device is

sudo cryptsetup luksOpen <device> <name>

As I understand the syntax, the device designation can be /dev/sd??
where the first question mark is the third letter of the device selected
by the OS, and the second question mark is the partition number. Since
device designation in this way is not constant I would like to use the
UUID of the device instead of having to check beforehand which sd
desognation the OS chose when each such stick is attached to the computer.

Running sudo blkid -L I found the UUIDs for each stick which are quite
long, e.g., UUID="65e7697c-d5fa-4e16-84e9-c45d2f81dd69".  I assume I can
somehow use such a UUID to indicate the device instead /dev/sd??, but I
cannot figure out how.  The cryptsetup man page does not say how, nor
could I find out how by googling.

If I knew how I could create individual script files to open and close
each stick.  I would be using the bash shell for such scripts. (The
script would also include the mount/unmount command by using the
????-???? UUID assigned to each stick after access to it is opened.)

I would consequently appreciate it if someone could tell me how.

Regards, Ken Heard

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAlQ5c5AACgkQlNlJzOkJmTcl5wCfRoOH8GJboWcdR7RDFHIZYXQw
4ogAnRODg4/HaT2YmQYDrgtwizzn78WT
=oorg
-----END PGP SIGNATURE-----


Reply to: