Ask / Submit

Revision history [back]

click to hide/show revision 1
initial version

posted 2015-10-23 03:47:23 +0300

little workaround i just tried:

  • Install cryptsetup from openrepos.net
  • plug in a sd card
  • cryptsetup -y -c aes-cbc-essiv:sha256 create sdcard /dev/mmcblk1
  • mkfs.ext4 /dev/mapper/sdcard
  • mkdir /home/nemo/crypto
  • mount /dev/mapper/sdcard
  • mv /home/nemo/Pictures /home/nemo/crypto/Pictures
  • ln - /home/nemo/crypto/Pictures /home/nemo/Pictures
  • do the same with .cache/.nemothumbs

  • add this line to /etc/fstab/:

/dev/mapper/sdcard /home/nemo/crypt ext4 defaults,noatime,user,noauto 0 0

  • unlock script:

sudo /usr/sbin/cryptsetup open /dev/mmcblk1 sdcard --type plain

mount /dev/mapper/sdcard

sudo /bin/chown nemo /home/nemo/crypt

  • lock script:

umount /home/nemo/crypt

sudo /usr/sbin/cryptsetup close sdcard

  • install sudo and edit /etc/sudoers:

nemo ALL=NOPASSWD: /usr/sbin/cryptsetup close sdcard

nemo ALL=NOPASSWD: /usr/sbin/cryptsetup open /dev/mmcblk1 sdcard --type plain

nemo ALL=NOPASSWD: /bin/chown nemo /home/nemo/crypt

there you are! More a hack than a solution, but this will protect your photos.


PS: this comes with absolutely no warranty, do not just copy+paste!

little workaround i just tried:

  • Install cryptsetup from openrepos.net
  • plug in a sd card
  • cryptsetup -y -c aes-cbc-essiv:sha256 create sdcard /dev/mmcblk1
  • mkfs.ext4 /dev/mapper/sdcard
  • mkdir /home/nemo/crypto
  • mount /dev/mapper/sdcard/dev/mapper/sdcard /home/nemo/crypto
  • mv /home/nemo/Pictures /home/nemo/crypto/Pictures
  • ln - /home/nemo/crypto/Pictures /home/nemo/Pictures
  • do the same with .cache/.nemothumbs

  • add this line to /etc/fstab/:

/dev/mapper/sdcard /home/nemo/crypt ext4 defaults,noatime,user,noauto 0 0

  • unlock script:

sudo /usr/sbin/cryptsetup open /dev/mmcblk1 sdcard --type plain

mount /dev/mapper/sdcard

sudo /bin/chown nemo /home/nemo/crypt

  • lock script:

umount /home/nemo/crypt

sudo /usr/sbin/cryptsetup close sdcard

  • install sudo and edit /etc/sudoers:

nemo ALL=NOPASSWD: /usr/sbin/cryptsetup close sdcard

nemo ALL=NOPASSWD: /usr/sbin/cryptsetup open /dev/mmcblk1 sdcard --type plain

nemo ALL=NOPASSWD: /bin/chown nemo /home/nemo/crypt

there you are! More a hack than a solution, but this will protect your photos.


PS: this comes with absolutely no warranty, do not just copy+paste!