{"id":19306,"date":"2020-05-22T11:29:29","date_gmt":"2020-05-22T09:29:29","guid":{"rendered":"https:\/\/blog.trifork.com\/?p=19306"},"modified":"2020-05-22T11:29:29","modified_gmt":"2020-05-22T09:29:29","slug":"linux-homedir-encryption","status":"publish","type":"post","link":"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/","title":{"rendered":"Linux homedir encryption"},"content":{"rendered":"\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2020\/05\/Sans-titre-copy-2.png\" alt=\"\" class=\"wp-image-19764\" width=\"737\" height=\"414\" srcset=\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2020\/05\/Sans-titre-copy-2.png 560w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2020\/05\/Sans-titre-copy-2-300x169.png 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-pullquote alignright cleanquote\"><blockquote><p><strong>ZFS features (excerpt)<\/strong><\/p><ul>\n<li>Snapshots and clones. Useful for e.g. <a href=\"https:\/\/www.docker.com\/\" target=\"_&quot;blank&quot;\" rel=\"noopener noreferrer\">docker<\/a> and system backups.<\/li>\n<li>Copy-on-write (making snapshots initially zero-cost).<\/li>\n<li>Raid.<\/li>\n<li>Encryption.<\/li>\n<li>SSD caching.<\/li>\n<\/ul>\n<p>See more on the&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/OpenZFS\" target=\"_blank\">ZFS wiki page<\/a>&nbsp;(<a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/OpenZFS#Features\" target=\"_blank\">features<\/a>) or this&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/www.reddit.com\/r\/sysadmin\/comments\/4sajnk\/whats_so_great_about_zfs\/d585pm9\/\" target=\"_blank\">reddit post<\/a>.<\/p><\/blockquote><\/figure>\n\n\n\n<p>Ubuntu has released <a href=\"https:\/\/wiki.ubuntu.com\/FocalFossa\">Focal Fossa (20.04)<\/a> and as I had just acquired my new laptop, I decided to test it out. Getting a software uprade is always fun; it is always exciting to discover <a href=\"https:\/\/www.fosslinux.com\/28959\/ubuntu-20-04-release-date-new-features-and-more.htm\">new features<\/a> (and bugs \ud83d\ude16) and see what\u2019s been changed.<\/p>\n\n\n\n<p>One of the <a href=\"https:\/\/www.omgubuntu.co.uk\/2019\/10\/ubuntu-20-04-release-features\">new features<\/a> in Focal Fossa is improved <a href=\"https:\/\/en.wikipedia.org\/wiki\/OpenZFS\">ZFS<\/a> support; it is now possible to use it \/ enable it right from the installation of Ubuntu. Great \u270b. I wanted to give it a go (looking forward to features such as built-in raid support and snapshots) but unfortunately it clashed a little bit with my need to encrypt my home directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Motivation<\/h2>\n\n\n\n<p>Writing this blog post in an IT professional setting, it may be obvious why you would encrypt (part of) your disk. It is a basic matter of respecting your customer&#8217;s data. However, if you read this as a private person, there might still be good reasons to go through the trouble:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>While we don&#8217;t have private key files for our net banking and government related sites any-more [1], But we have a <a rel=\"noreferrer noopener\" href=\"https:\/\/play.google.com\/store\/apps\/details?id=dk.e_nettet.mobilekey.everyone&amp;hl=da&amp;pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1\" target=\"_blank\">mobile app<\/a> for it instead. Perhaps we should pay a bit of attention to security on those devices as well\u2026! I still have SSH-keys for technical accounts on the net, and for my personal server. And who knows what a skilled hacker could gather in terms of personal information from my web browser cache!?!? <\/li><li>If my laptop got stolen, I would also like to know that the thief could not readily browse through my personal data (mails, photos, documents, etc.). I believe it is similar to when burglars breaks in to homes: It is not a nice feeling to know that some random stranger has been rummaged through your personal belongings.<\/li><\/ul>\n\n\n\n<p>Lastly \u2013 and this might not apply to you \u2013 Why not? I&#8217;m a geek and it\u2019s fun \ud83d\ude42<\/p>\n\n\n\n<p>While this post about home directory encryption in a setting of ZFS (and its built-in support of encryption), the general approach may also be of interest to you if you run&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/Ext4\" target=\"_blank\">ext4<\/a>&nbsp;and\/or other&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/Comparison_of_disk_encryption_software\" target=\"_blank\">disk encryption tools<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Overview \u2013 What is the challenge?<\/h2>\n\n\n\n<p>The main challenge is two fold:<\/p>\n\n\n\n<p><strong>Ubuntu 20.04 did not provide an option to encrypt your home directory when using ZFS<\/strong><\/p>\n\n\n\n<p>Ubuntu did previously provide this option, but it used eCryptfs which was considered&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/ecryptfs-utils\/+bug\/1756840\" target=\"_blank\">buggy, under-maintained, [and] not fit for main anymore<\/a>&nbsp;and has thus been removed.<\/p>\n\n\n\n<p><strong>When enabling encryption manually (after installation) the decrypt action is performed before user login<\/strong><\/p>\n\n\n\n<p>The issue arises because ZFS is configured (on Ubuntu 20.04) to automatically mount all file systems on the system at boot time \u2013 including encrypted home directories.&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/GNOME_Display_Manager\" target=\"_blank\">GDM<\/a>&nbsp;has support for asking for passwords, and hence a prompt appears at boot time. This is great for system wide storage, but not so great for user directories.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PAM to the rescue<\/h2>\n\n\n\n<figure class=\"wp-block-pullquote alignright cleanquote\"><blockquote><p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Pluggable_authentication_module\">PAM<\/a>&nbsp;is a authentication system that allows programs that rely on authentication to be written independent of the underlying authentication scheme. I.e. if&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/GNOME_Display_Manager\">GDM<\/a>&nbsp;need to authenticate me as a user, it (GDM) can be agnostic about whether my password is in a file on the hard drive or is validated against an AD on the network.<\/p><\/blockquote><\/figure>\n\n\n\n<p>PAM is the&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Pluggable_authentication_module\">Pluggable Authentication Module<\/a>&nbsp;system in *nix world. If you don\u2019t know it, don\u2019t worry. Neither do I. It is a complex system and I have not had the time (or urge) to really dig in to it other than what I needed here:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>We can use PAM to get a hold of the user password when logging in, and in turn use the password to unlock our home directory storage.<\/p><\/blockquote>\n\n\n\n<p>So\u2026 what we are going to do is:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Migrate the home directory from an unencrypted home directory to an encrypted one.<\/li><li>Write a small Bash script to assist us in unlocking our home directory.<\/li><li>Set up PAM to use the Bash script.<\/li><li>Configure properties (used in the unlock script) on our ZFS volume.<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Warning \u2013 Here Be Monsters<\/h2>\n\n\n\n<p>Before you continue, let&#8217;s just align expectations for a moment. The following guide has been written with the following assumptions in mind:<\/p>\n\n\n\n<p>If you continue on this journey with me, then I will assume that you&#8230;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Know your way around your Linux system.<\/li><li>Have the basic knowledge of ZFS (at least read the&nbsp;<a href=\"https:\/\/linux.die.net\/man\/8\/zfs\">ZFS man page<\/a>. Or skimmed it. Or\u2026 you know\u2026 have heard of it).<\/li><li>Know your way around Bash scripting.<\/li><\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Here Be Monsters<\/strong>. Messing around your filesystem may lead to data loss. Do back up your data. Proceed at own risk.<\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Migrating the data<\/h2>\n\n\n\n<p>It is not possible to encrypt an existing dataset (filesystem) in ZFS once it has been created. Instead one has to make a little (fairly straight-forward) dance to create a new dataset (encrypted right from the beginning) and then move the data.<\/p>\n\n\n\n<p>The command snippets below are examples from my own system; remember that you need to adapt the paths as you go.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Create a temporary admin user.<\/li><li>Log out of your normal user and log in with the temporary admin user.<\/li><li>Move the mount point of your normal user homedir:<br \/><code>sudo zfs set mountpoint=\/home\/jvc_nonenc rpool\/USERDATA\/jvc_tdssc<\/code><br \/>Note, here&nbsp;<code>rpool\/USERDATA\/jvc_tdssc<\/code>&nbsp;is the existing un-encrypted dataset for my home directory, created by the Ubuntu installation.<\/li><li>Creat a new encrypted home directory:<br \/><code>sudo zfs create -o encryption=aes-256-gcm -o keyformat=passphrase -o keylocation=prompt rpool\/USERDATA\/jvc_enc -o mountpoint=\/home\/jvc<\/code><br \/><strong>Important:<\/strong>&nbsp;Use your normal user password for this encryption, otherwise you won\u2019t be able to decrypt the storage automatically when you log in.<\/li><li>Set ownership of new home directory:&nbsp;<code>sudo chown jvc:jvc \/home\/jvc<\/code><\/li><li>Copy data from old home directory to new:&nbsp;<code>sudo -u jvc rsync -ar \/home\/jvc_noenc\/ \/home\/jvc\/<\/code><\/li><li>Make a mental note to clean up (remove) the temporary user and old home directory when all is set and done.<\/li><\/ol>\n\n\n\n<p>I did the dance and rebooted my computer, and got (as expected) this:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/talldanestale.dk\/wp-content\/uploads\/2020\/04\/IMG_20200405_210528-1.jpg\" alt=\"\" class=\"wp-image-1820\" \/><\/figure><\/div>\n\n\n\n<p>So yes, my home directory was encrypted. Great. But as expected, I now have to enter my password twice: Once during boot for unlocking the storage, and then once more for logging in to the system. This is an issue for me in two ways:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>I just dislike having to enter my password twice.<\/li><li>If I share my computer (could be a co-worker; could be my girlfriend on my personal computer) then he\/she would not be able to do so without me entering my password at boot time.<\/li><\/ol>\n\n\n\n<p>Fair enough\u2026 most of the time I don\u2019t shut down my computer but only suspends it (like everyone else)\u2026 but still\u2026<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Writing the unlock-mount script<\/h2>\n\n\n\n<p>I will just show the script I use here. Assuming that you know how to read Bash, the content is fairly clear (and comments are provided in the code). The properties&nbsp;<code>canmount<\/code>&nbsp;and&nbsp;<code>dk.talldanestale.automount:user<\/code>&nbsp;will be explained in step 4.<\/p>\n\n\n\n<p>Save the script to&nbsp;<code>\/sbin\/mount-zfs-homedir<\/code>&nbsp;and remember to set the executable bit:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; wrap-lines: false; notranslate\" title=\"\">\n#!\/bin\/bash\n\nset -eu\n\n# Password is given to us via stdin, save it in a variable\n# for later\nPASS=$(cat -)\n\n# List all zfs volumes, listing the *local* value of the\n# property canmount.\nzfs get canmount -s local -H -o name,value | while read line; do\n    # Filter on canmount == 'noauto'. Filesystems marked 'noauto'\n    # can be mounted, but is not done so automatically during boot.\n    canmount=$(echo $line | awk '{print $2}')\n    &#x5B;&#x5B; $canmount = 'noauto' ]] || continue\n\n    # Filter on user property dk.talldanestale.automount:user.\n    # It should match the user that we are logging in as ($PAM_USER).\n    volname=$(echo $line | awk '{print $1}')\n    user=$(zfs get dk.talldanestale.automount:user -s local -H \\\n           -o value $volname)\n    &#x5B;&#x5B; $user = $PAM_USER ]] || continue\n\n    # Unlock and mount the volume\n    zfs load-key &quot;$volname&quot; &lt;&lt;&lt; &quot;$PASS&quot; || continue\n    zfs mount &quot;$volname&quot; || true # ignore erros\ndone\n<\/pre><\/div>\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Debug tip:<\/strong>&nbsp;You can change&nbsp;<code>set -eu<\/code>&nbsp;to&nbsp;<code>set -eux<\/code>&nbsp;to make Bash print out all commands as it is executing the script. In order to see the output, you also need to enable debug output in PAM. See next step.<br \/><br \/>Note: The use of&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/www.tldp.org\/LDP\/abs\/html\/x17837.html\" target=\"_blank\">here-string<\/a>&nbsp;(the&nbsp;<code>&lt;&lt;&lt;<\/code>&nbsp;operator) instead of&nbsp;<code>echo \"$PASS\" | ...<\/code>&nbsp;prevents your password from being written to the log.<\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Set up PAM to use the Bash script.<\/h2>\n\n\n\n<p>The approach is to use the PAM module&nbsp;<code>pam_exec.so<\/code>&nbsp;to pass on the user password to an unlock-script.<\/p>\n\n\n\n<p>The PAM configuration is a set of files residing in&nbsp;<code>\/etc\/pam.d\/<\/code>. Some files are service specific<sup><a href=\"void(0)\">3<\/a><\/sup>&nbsp;while others are shared (included) by the other files. On my Ubuntu system there is a file named&nbsp;<code>\/etc\/pam.d\/common-auth<\/code>&nbsp;that is included from other services that enable users to login<sup><a href=\"void(0)\">4<\/a><\/sup>. This is the place to add the&nbsp;<code>pam_exec.so<\/code>&nbsp;hook:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Edit the file&nbsp;<code>\/etc\/pam.d\/common-auth<\/code>:<\/li><li>Add the line:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">auth optional pam_exec.so expose_authtok \/sbin\/mount-zfs-homedir<\/pre>\n\n\n\n<p>This line can be read as:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Set up a hook for user authentication (<code>auth<\/code>) \u2026<\/li><li>that is allowed to fail (<code>optional<\/code>) \u2026<\/li><li>to run a command (<code>pam_exec<\/code>) \u2026<\/li><li>that exposes the password through stdin (<code>expose_authtok<\/code>).<\/li><li>The command to run is&nbsp;<code>mount-zfs-homedir<\/code>.<\/li><\/ol>\n\n\n\n<p>That is it for PAM configuration.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Debug tip:<\/strong>&nbsp;If you need to debug things, then adding&nbsp;<code>debug log=\/tmp\/file.log<\/code>&nbsp;will help you. Example:<br \/><br \/><code>auth optional pam_exec.so expose_authtok debug log=\/tmp\/file.log \/sbin\/mount-zfs-homedir<\/code><\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Configure properties on our ZFS volume.<\/h2>\n\n\n\n<p>The unlock script used two properties, which we will explain and configure here:<\/p>\n\n\n\n<p><strong>Property&nbsp;<\/strong><code><strong>canmount<\/strong><\/code><\/p>\n\n\n\n<p>The first (substantial) line of the script lists datasets in the zfs pool along with the&nbsp;<code>canmount<\/code>&nbsp;property. We filter on values&nbsp;<code>noauto<\/code>. The&nbsp;<code>noauto<\/code>&nbsp;value indicates to the system that it should not be auto-mounted during boot (which is the trigger for the password prompt at boot).<\/p>\n\n\n\n<p>In other words: We need to mark our home directory not to be auto-mounted at boot:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo zfs set canmount=noauto rpool\/USERDATA\/jvc_enc<\/pre>\n\n\n\n<p><strong>Property&nbsp;<\/strong><code><strong>dk.talldanestale.automount:user<\/strong><\/code><\/p>\n\n\n\n<p>Next, the script is filtering on a custom property&nbsp;<code>dk.talldanestale.automount:user<\/code>&nbsp;which I use to indicate to which user this dataset (filesystem) belongs. I do not want to attempt to mount my girlfriend\u2019s home directory using my password.<\/p>\n\n\n\n<p>The property is one I created. The ZFS states that user properties must contain a \u2018:\u2019, but otherwise is free to choose. I like the concept of prepending (semi) global properties with organization identifier. Hence the&nbsp;<code>dk.talldanestale<\/code>.<\/p>\n\n\n\n<p>To set the property, execute:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo zfs set dk.talldanestale.automount:user=jvc rpool\/USERDATA\/jvc_enc<\/pre>\n\n\n\n<p>That\u2019s it. I hope it helps you on your journey.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Addendum: zsys automatic snapshots<\/h2>\n\n\n\n<p>One of the really nice features of ZFS is the snapshot feature. It enables you to, well, take a snapshot on the fly of the filesystem for later use. Later use could be\u2026<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>mounting (read-only) for retrieving lost files.<\/li><li>rolling back system after a failed upgrade or install of a driver.<\/li><li>a precautionary backup when you are about to perform actions that could potentially result in data loss.<\/li><\/ul>\n\n\n\n<p>On Ubuntu there is a hook set up in the apt\/dpkg configuration that (via&nbsp;<a href=\"https:\/\/github.com\/ubuntu\/zsys\">zsys<\/a>) creates a snapshot of the machine just before installing packages. Unfortunately something broke when I created my new home directory and now I would get the error&nbsp;<code>Couldn't find any association for the user dataset ...<\/code>.<\/p>\n\n\n\n<p>Not knowing anything about zsys or how this was set up on Ubuntu I went spelunking and found the property&nbsp;<code>com.ubuntu.zsys:bootfs-datasets<\/code>&nbsp;that was set on my old home dataset but (of course) not on my new. So\u2026 copying this property fixed the issue:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">VAL=$(zfs get com.ubuntu.zsys:bootfs-datasets rpool\/USERDATA\/jvc_tdssc -H -ovalue)<br \/>sudo zfs set com.ubuntu.zsys:bootfs-datasets=$VAL rpool\/USERDATA\/jvc_enc<\/pre>\n\n\n\n<p>All done. Hope it helped you as well!<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/bit.ly\/3BAo305\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"256\" src=\"https:\/\/trifork.nl\/articles\/wp-content\/uploads\/sites\/3\/2022\/02\/Blog-Banner-1-1024x256.png\" alt=\"\" class=\"wp-image-20303\" srcset=\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2022\/02\/Blog-Banner-1-1024x256.png 1024w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2022\/02\/Blog-Banner-1-300x75.png 300w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2022\/02\/Blog-Banner-1-768x192.png 768w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2022\/02\/Blog-Banner-1-1536x384.png 1536w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2022\/02\/Blog-Banner-1-2048x512.png 2048w, https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2022\/02\/Blog-Banner-1-1920x480.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>ZFS features (excerpt) Snapshots and clones. Useful for e.g. docker and system backups. Copy-on-write (making snapshots initially zero-cost). Raid. Encryption. SSD caching. See more on the&nbsp;ZFS wiki page&nbsp;(features) or this&nbsp;reddit post. Ubuntu has released Focal Fossa (20.04) and as I had just acquired my new laptop, I decided to test it out. Getting a software [&hellip;]<\/p>\n","protected":false},"author":65,"featured_media":19764,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[10,124],"tags":[531,532,48,533,71,534,535],"class_list":["post-19306","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","category-system-administration","tag-convenience","tag-encryption","tag-linux","tag-pam","tag-security","tag-ubuntu","tag-zfs"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux homedir encryption - Trifork Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux homedir encryption - Trifork Blog\" \/>\n<meta property=\"og:description\" content=\"ZFS features (excerpt) Snapshots and clones. Useful for e.g. docker and system backups. Copy-on-write (making snapshots initially zero-cost). Raid. Encryption. SSD caching. See more on the&nbsp;ZFS wiki page&nbsp;(features) or this&nbsp;reddit post. Ubuntu has released Focal Fossa (20.04) and as I had just acquired my new laptop, I decided to test it out. Getting a software [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/\" \/>\n<meta property=\"og:site_name\" content=\"Trifork Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-22T09:29:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2020\/05\/Sans-titre-copy-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"560\" \/>\n\t<meta property=\"og:image:height\" content=\"315\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"J\u00f8rn Villesen Christensen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"J\u00f8rn Villesen Christensen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/\",\"url\":\"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/\",\"name\":\"Linux homedir encryption - Trifork Blog\",\"isPartOf\":{\"@id\":\"https:\/\/trifork.nl\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2020\/05\/Sans-titre-copy-2.png\",\"datePublished\":\"2020-05-22T09:29:29+00:00\",\"author\":{\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/39978babce7fa5541e8ea051bb457a6b\"},\"breadcrumb\":{\"@id\":\"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/#primaryimage\",\"url\":\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2020\/05\/Sans-titre-copy-2.png\",\"contentUrl\":\"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2020\/05\/Sans-titre-copy-2.png\",\"width\":560,\"height\":315},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/trifork.nl\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux homedir encryption\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/trifork.nl\/blog\/#website\",\"url\":\"https:\/\/trifork.nl\/blog\/\",\"name\":\"Trifork Blog\",\"description\":\"Keep updated on the technical solutions Trifork is working on!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/trifork.nl\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/39978babce7fa5541e8ea051bb457a6b\",\"name\":\"J\u00f8rn Villesen Christensen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/trifork.nl\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7722a2fda4d384a9e9eeb7dc563f5c8b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7722a2fda4d384a9e9eeb7dc563f5c8b?s=96&d=mm&r=g\",\"caption\":\"J\u00f8rn Villesen Christensen\"},\"sameAs\":[\"http:\/\/blog.trifork.com\"],\"url\":\"https:\/\/trifork.nl\/blog\/author\/jvc\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux homedir encryption - Trifork Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/","og_locale":"en_US","og_type":"article","og_title":"Linux homedir encryption - Trifork Blog","og_description":"ZFS features (excerpt) Snapshots and clones. Useful for e.g. docker and system backups. Copy-on-write (making snapshots initially zero-cost). Raid. Encryption. SSD caching. See more on the&nbsp;ZFS wiki page&nbsp;(features) or this&nbsp;reddit post. Ubuntu has released Focal Fossa (20.04) and as I had just acquired my new laptop, I decided to test it out. Getting a software [&hellip;]","og_url":"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/","og_site_name":"Trifork Blog","article_published_time":"2020-05-22T09:29:29+00:00","og_image":[{"width":560,"height":315,"url":"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2020\/05\/Sans-titre-copy-2.png","type":"image\/png"}],"author":"J\u00f8rn Villesen Christensen","twitter_card":"summary_large_image","twitter_misc":{"Written by":"J\u00f8rn Villesen Christensen","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/","url":"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/","name":"Linux homedir encryption - Trifork Blog","isPartOf":{"@id":"https:\/\/trifork.nl\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/#primaryimage"},"image":{"@id":"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/#primaryimage"},"thumbnailUrl":"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2020\/05\/Sans-titre-copy-2.png","datePublished":"2020-05-22T09:29:29+00:00","author":{"@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/39978babce7fa5541e8ea051bb457a6b"},"breadcrumb":{"@id":"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/#primaryimage","url":"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2020\/05\/Sans-titre-copy-2.png","contentUrl":"https:\/\/trifork.nl\/blog\/wp-content\/uploads\/sites\/3\/2020\/05\/Sans-titre-copy-2.png","width":560,"height":315},{"@type":"BreadcrumbList","@id":"https:\/\/trifork.nl\/blog\/linux-homedir-encryption\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/trifork.nl\/blog\/"},{"@type":"ListItem","position":2,"name":"Linux homedir encryption"}]},{"@type":"WebSite","@id":"https:\/\/trifork.nl\/blog\/#website","url":"https:\/\/trifork.nl\/blog\/","name":"Trifork Blog","description":"Keep updated on the technical solutions Trifork is working on!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/trifork.nl\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/39978babce7fa5541e8ea051bb457a6b","name":"J\u00f8rn Villesen Christensen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/trifork.nl\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7722a2fda4d384a9e9eeb7dc563f5c8b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7722a2fda4d384a9e9eeb7dc563f5c8b?s=96&d=mm&r=g","caption":"J\u00f8rn Villesen Christensen"},"sameAs":["http:\/\/blog.trifork.com"],"url":"https:\/\/trifork.nl\/blog\/author\/jvc\/"}]}},"_links":{"self":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts\/19306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/comments?post=19306"}],"version-history":[{"count":0,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/posts\/19306\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/media\/19764"}],"wp:attachment":[{"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/media?parent=19306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/categories?post=19306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trifork.nl\/blog\/wp-json\/wp\/v2\/tags?post=19306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}