- Set up PAM correctly:
sudo pam-config -a --systemd_home
- Enable systemd-homed.service on boot:
sudo systemctl enable --now systemd-homed
- Enable
dm-crypt
kernel module for loading on boot and insert it now:
echo "dm-crypt" | sudo tee /etc/modules-load.d/dm-crypt.conf && sudo modprobe dm-crypt
- Temporarily set SELinux to permissive for debugging:
sudo setenforce permissive
- Create a new systemd-homed user (just for testing, not for daily use!):
homectl create testuser
-
Log out of your user account and try to login to the new homed user from GDM. You will need to manually enter the username with option "not listed". Afterwards, log in back to your regular user account.
-
Gather SELinux violations to create custom policy (you can add
-w
to add explanations for each violation):
sudo audit2allow -b >> somefilename.txt
- Create your own custom module out of the gathered violations:
sudo audit2allow -i somefilename.txt -M homed
- Insert your custom module:
sudo semodule -i homed.pp
- Re-enable SELinux:
sudo setenforce enforcing
- Reboot your system and you should be able to use systemd-homed just fine. GDM will also remember a manually entered user after the first time. To migrate an existing user into homed, follow this guide: https://systemd.io/CONVERTING_TO_HOMED/
Since all this is experimental and not fully tested at all, set a root password with sudo passwd root
or setup another non-homed user with sudo privileges. Then you can login to an emergency shell in GDM (Alt+Shift+F2) and fix any occuring errors. Especially helpful if your SELinux policy did not contain all needed rules at once and you cannot login.
Podman is a little bit special regarding sub-uids and sub-gids. You will need to manually fix those like described here: https://rootlesscontaine.rs/getting-started/common/subuid/#advanced-information
- https://systemd.io/CONVERTING_TO_HOMED/
- https://systemd.io/HOME_DIRECTORY/
- https://systemd.io/UIDS-GIDS/
- https://www.freedesktop.org/software/systemd/man/latest/userdbctl.html
- https://www.freedesktop.org/software/systemd/man/latest/homectl.html
- https://www.freedesktop.org/software/systemd/man/latest/systemd-homed.service.html
- https://www.freedesktop.org/software/systemd/man/latest/pam_systemd_home.html
- https://www.freedesktop.org/software/systemd/man/latest/homed.conf.html#