Bug 291341 - Encrypted ZFS home doesn't work during install FreeBSD 15.0
Summary: Encrypted ZFS home doesn't work during install FreeBSD 15.0
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 15.1-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-sysinstall (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-02 03:21 UTC by Yonas Yanfa
Modified: 2026-07-04 05:40 UTC (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yonas Yanfa 2025-12-02 03:21:11 UTC
I just tried installing FreeBSD 15-RELEASE.

When creating a non-root user, it asked if I wanted to enable ZFS encryption. I chose yes, but it later errored out saying the dataset didn't exist.

I suppose bsdinstall tried to enable ZFS encryption a bit too early, because the home dataset was created, but not encrypted.
Comment 1 Michael Osipov freebsd_committer freebsd_triage 2025-12-02 17:12:54 UTC
jrm, something for you?
Comment 2 Robert Cocker 2025-12-29 08:22:28 UTC
I can confirm with FreeBSD 15.0-RELEASE for my isolated installation. There are a number of us in the community testing the latest 15.0 version.
Comment 3 Yonas Yanfa 2026-06-18 20:06:46 UTC
Same issue with FreeBSD 15.1.

Can you give this a higher priority.
Comment 4 Oleksandr Kryvulia 2026-06-20 07:42:49 UTC
I can reproduce it on 15.1 only when entering a weak encryption key. adduser(8) do not handle it and returns an error while creating dataset.
Comment 5 Yonas Yanfa 2026-06-24 19:22:52 UTC
(In reply to Oleksandr Kryvulia from comment #4)

Thanks! Using a stronger password got me pass this issue but I found out my home folder wasn't decrypted after logging in.

Adding this to `/etc/pam.d/system` got it automatically decrypted:


```
auth optional pam_zfs_key.so try_first_pass homes=zroot/home
session optional pam_zfs_key.so homes=zroot/home
```
Comment 6 Oleksandr Kryvulia 2026-07-04 05:40:28 UTC
Proposed patch review D57962.