by knorker · 6y ago · 0 comments
What's the point? This is not the 1990s. Who exactly is this for?
Who actually has multi-user systems. Really has them.
Clients are either all single-user laptops (at home and at work), or single-user workstations. Very rarely they're multi user workstations, but then they use something non-local for their home directories anyway, so again who is this for?
This isn't the 1990s with 100 users on your computer club Linux server. Everyone just gets their own VM, now.
Honestly, who still runs a 1990s style shared shell server?
And per-user /home encryption on a shared system just sounds like a threat model contradiction. If you want to protect the users from each other then turning a blind eye to the regular local root exploits sounds odd at best. On servers for cifs /home if my home directory is secret, why would I expose it to every server I log in to?
And if not for human user accounts, how will this help anyone run their docker containers or any other type of service?
Am I just out of touch? Does this actually have users? Does it actually solve a problem?
It breaks many use cases, that's very obvious.
In other words, you personally don't use multi-user systems, and somehow you interpret that as no one having the need for multi-user systems. Does that make any sense?
Speaking for myself, if multiseat Linux boxes were more easy to setup, I would certainly use one of those as my family's primary desktop. Today's desktop systems are quite capable of taking a multi-user computational beating and breeze through any amount of browser windows opened. Thus, if buying a monitor and keyboard is all it takes to get another computer seat then why not?
No need for personal attacks.
I note that you opted to ridicule instead of answering, which I find unnecessary.
Not sure I've heard of people using it, but I'm curious!
Enter multi-seat. A few "sticky" commands later (i.e. only needed for reconfiguration, not on every boot) I have three user stations, each with monitor, keyboard, mouse, audio and at least one dedicated USB socket. Works a treat. It's not 100% bulletproof; crashes to the point of needing a reboot maybe 2-3 times a year, but aside from that indistinguishable from dedicated computers for each screen.
Stock Fedora 28. Here's the sum total of commands needed to set up the multiseat in my setup (seat 0 gets everything not assigned to the others).
loginctl attach seat1 /sys/devices/pci0000:00/0000:00:09.0/0000:05:00.0/drm/card0 /sys/devices/pci0000:00/0000:00:09.0/0000:05:00.0/graphics/fb0 /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-5 loginctl attach seat2 /sys/devices/pci0000:00/0000:00:07.0/0000:04:00.0/drm/card2 /sys/devices/pci0000:00/0000:00:07.0/0000:04:00.0/graphics/fb2 /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-3 loginctl attach seat2 /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.1/1-4.1.4/1-4.1.4:1.2/0003:046D:C52B.00A3/0003:046D:4004.00A4/input/input194 loginctl attach seat2 /sys/devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4.4/1-4.4:1.0/0003:045E:00B9.00A5/input/input195
I hope this functionality doesn't turn into abandonware before I'm done with this monster machine i.e. it breaks or becomes too obsolete. I did in the past try to set up multiseat, just for fun, with a Displaylink box, after reading the article about it, but got nowhere, with the distinct feeling that they got it working once, and then abandoned it.
You run into occasional other "more than one user per computer" issues. For example, trying to access the same UDP RTSP camera from VLC on two different desktops.
And the three desktops do get actively used by three differerent family members. Linux on the desktop for non-geeks/kids? Nobody cares. As long as the browser works with full video capability (smooth 1080p Youtube) and, in the child's case, the Tuxpaint painting program, everybody happy.
And a Raspberry Pi.
I also think it's likely there are future solutions which will be made possible that we can't even imagine right now, through what this brings to the table.
I manage huge compute clusters, with and without VMs, and can't imagine a feasible use case for this, barring a time machine to the 90s.
No. First of all, in general disk encryption is orthogonal to multi-user or multi-seat systems, and the same case for disk encryption can be made wrt VM sessions. Secondly, the main feature is migratable and self-contained home directories, which is also relevant for VMs (or even more relevant).
School labs with many shared computers for kids high school aged and below.
Larger servers at colleges for projects that are just unreasonable to run on a standard desktop machine.
But again: What's the threat model for LUKS, here? A student has their stuff on that exact shared machine in the computer lab, and somehow local root attacks only work when attacker is alone on the machine?
setfacl -R \
-m d:u:user1:rwx -m u:user1:rwx \
-m d:u:user2:rwx -m u:user2:rwx \
/home/shared
d:u: sets the default user ACL for future directory entriesu: sets the current user ACL for existing directory entries
-R sets the ACLs recursively on existing files
Please be aware that that the common semantics are that permissions are associated with a file, not with its name (and a file may have a lot of names through hard links, or no name at all - open a file, delete it, and it is only accessible if you have an fd, or with little more work through the inode number)
Not much differently than sharing a USB volume.
This way you retain each user's privacy, since main groups aren't changed, don't need to run custom scripts each time, and don't have multiple copies of the shared files. The only (IMHO minor) issue would be that newly shared files might only be accessible for the other user 30s later on average, and 1 minute at most. The cron job might be converted into a daemon monitoring new files appearing in /home/user3, but that is left as an exercise for the reader :)
The fact that you are unfamiliar with a use case doesn't mean it doesn't exist.
Oh, I agree! That's my point. So what is systemd trying to solve?
Still, the main aim of this is in my opinion not safe isolation of users on a single machine, but rather safe locking of the encrypted root folder.
With a normal LUKS setup, everything is inside a LUKS container, including the rootfs from which the OS itself is running. This complicates locking the LUKS container when the device gets suspended, as there will be open files, etc.
With Homed as far as I can tell, this is explicitly possible, it should be able to drop the encryption keys when machine goes to suspend, making it less likely your data will be recovered if the machine gets lost or stolen. With the keys in RAM an attacker might attempt to pull it from the machine & read the keys or use some method to defeat the lockscreen. With the keys dumped from RAM, this is no longer possible.
https://github.com/guns/go-luks-suspend from 2013
This also doesn't accidentally leak all the stuff not within /home/you
> [locking when suspenden] With Homed as far as I can tell, this is explicitly possible
Is it? Your home dir definitely will have open files when you lock or suspend.
We do. We have like a dozen shared, beefy shell servers (varies, but think ~32 core not too old Xeon, ~256GB RAM, 1G or 10G stable network that's local to the office, TB's of storage and essentially unlimited on NFS) for devs (and more of the same dedicated for CI/CD).
We need this because the codebases are huge and take hours to build on a laptop (and copying across a home uplink would take forever too).
Homedirs are NFS mounted.
It's more cost efficient than spinning up an AWS/Azure instance for myself, and more limited resource efficient than spinning up a VM in OpenStack (both of which I do when appropriate). And it's very convenient team work wise.
There are (many, some avoidable but hard to fix by now) downsides for sure, but I cannot imagine doing this work solely on a laptop.
So do you run fscrypt or LUKS with that?
Because NFS was already possible, so what is systemd trying to solve?
Even on a single user workstation, having an encrypted root filesystem doesn't do as much good if your laptop is left booted up with the root filesystem unlocked most of the time. Systemd-homed in that scenario is supposed to make it easier to automatically unmount/mount on locking/unlocking the workstation.
systemd-homed isn't about multi-user systems, it's about multi-system users.
Goal #1: Migratable Home Directories (all the way to the point of "home-on-a-stick") https://cfp.all-systems-go.io/media/homed-asg2019.pdf
I want to take my home with me across all my systems, and /don't/ want network sync to do it with.
> encrypted home directories?
This is something that isn't widely available on personal systems that would be supported by this change.
I should note I think the idea of systemd is valid, but I am not a fan of the implementation. (binary log files? disorganized configuration directories?)
So… this has not been a problem for 99%+ of users for like 20 years.
I do like the idea of some parts of systemd. Like structured logging. I'm so sick of every single tool having its own logging format. Some multi line, some not. Some using UTC, some not. Some making up their own BS date format, etc…