03 May 2020 • 1 min read
systemd 245 came out on the 6th of March 2020.
In this release, among many changes brought, a notable one is that regarding how we see and think of the Linux
/home directory. A new service
systemd-homed.service has been added, whose role is to manage home directories.
Traditionally, user information on Linux systems have been recorded in the
/etc/shadow files. The former contains details about the user name, id, group id, shell, home directory, among other details, while the latter contains the user password information.
On the other hand
systemd-homed.service stores user information in a
~/.identity file in JSON format. The choice of JSON was mainly due to its popularity and easiness to process with the majority of programming languages.
Thus, every directory managed by
systemd-homed.service contains both the user information and the user data.
To create, remove or change home directories one would use the
$ sudo homectl create john --real-name="John Doe" -G wheel --disk-size=500M
What if you could carry your home directory in a pendrive and work from any (Linux) machine as if you are "home" ?
$ sudo homectl create john --real-name="John Doe" --image-path=/dev/disk/by-id/usb-SanDisk_Ultra_Fit_476fff954b2b5c44-0:0 --tasks-max=500
The above command creates the user
john in a pendrive and assigns a maximum of 500 concurrent tasks to him.
systemd-homed.service also allows you to have an encrypted home directory, but that, I will write about on another day. 😉
Twitter/Facebook card image source: auroria.io