News for hackers. Stuff that matters.
Re:Systemd Home Directories by jasonjayr on Sunday February 09, 2020 @09:54PM (#22286053)
This is new to me, and I watched through the video, and in usual fashion, any use case that he and his group thinks are not common, are just hand-waved away "that's not common" "You shouldn't do it that way" "If you want to use this, don't do that".

Yet, all the things he mentioned, like, remotely accessing a locked laptop via ssh, or maintaining a external user database for a cluster of machines in LDAP, are things I do on a regular basis.

He also mentioned something about requiring a privileged daemon to change your ssh keys? Is there any more information about that?

Given the gravity of systemd, and all it's ancillary services, how long till this is the one true way? How does this work in the case of true remotely accessible multi-user systems?

Re:Systemd Home Directories by bangboombang on Sunday February 09, 2020 @11:17PM (#22286405)
It sounds like enterprisey RedHat trash. Probably for better Active Directory integration, hence only CIFS is mentioned but not NFS.

And they might actually achieve this there, since SSSD is another abomination that kinda does that and mostly works, but once it doesn't and you try to debug it, you want to stab yourself in the brain with a dumb object.

For any other distro, I very much hope this thing is not enabled or even installed by default. Since I don't get the complaints about ecryptfs. I've been using it since around 2012 on multiple machines, multiple dist-upgrades and password changes and it never failed me once. Oh and SSHing into the machine works as expected!

Re:Systemd Home Directories by sekh60 on Monday February 10, 2020 @09:50AM (#22289537)
What is wrong with SSSD? Granted I have never used AD, but I have a domain set up with FreeIPA and it just works for the most part. The logs are pretty detailed when the rare issue comes up, and being kerberos based 80% of the time it's a time sync issue.
Re:Systemd Home Directories by bangboombang on Tuesday February 11, 2020 @05:45AM (#22297488)
There have been several issues over time. My general problem with it was complexity. What finally broke the camel's back for me was that for unexplained reasons, sssd stayed in "offline mode" after system standby for 30-60 seconds. We could validate that the network connection was back up after max. 5 seconds, but there was no way to get this thing to go online again. So basically we had to tell our users that they won't be able to login after system standby for a minute or so.

This was impossible to debug. You could send some signal (USR1 or 2 iirc) to sssd to force it into online mode, we even tried a crude script that would run after system resume and spam sssd with that signal for a minute to no avail. Shortly after I left that department the decision was made to move to Centrify. It's a pita in other ways apparently, but everything I know about it is just from hearsay from old colleagues aynways.

Re:Systemd Home Directories by candiddevmike on Sunday February 09, 2020 @10:12PM (#22286149)
Keep in mind the main use case for this is local desktop/interactive sessions. For system/service accounts, you can still use regular passwd files, SSH auth etc.

As you eluded to, the problems this is trying to solve include better integration/less rough edges with enterprise authentication (AD and the like), encrypting home directories, and making home directories and user accounts more portable. Anyone that does desktop fleet management will find a lot of stuff to be excited about here.

Re:Systemd Home Directories by nullc on Sunday February 09, 2020 @10:41PM (#22286266)
You don't ever remotely log into your desktop??!

What do you do if you've left files on your desktop at home/work and need them from work/home?

Re:Systemd Home Directories by candiddevmike on Sunday February 09, 2020 @10:50PM (#22286302)
In theory with homed you can just keep all of those files (home directory) on a share or USB drive and access them anywhere.

Im personally curious to see how this works with a tool like Syncthing

Re:Systemd Home Directories by nullc on Sunday February 09, 2020 @11:17PM (#22286404)
gee great, more unnecessary shoving everything into the "cloud"-- just to make sure that users have absolutely no due process protection for the confidentiality of their data.

Microsoft and Google do this because they make money out of monetizing their users. What's systemd's excuse?

As far as USB goes-- can you suggest a currently manufactured _good_ usb storage device? I've found myself scrounging for old ones because anything currently made are unreliable, slow (in spite of amazing performance claims), or usually both.

Re:Systemd Home Directories by viraptor on Monday February 10, 2020 @01:33AM (#22286870)
> gee great, more unnecessary shoving everything into the "cloud"-- just to make sure that users have absolutely no due process protection for the confidentiality of their data.

This doesn't really make sense as a response to comment mentioning Syncthing which works with any backend, including your other machines.

> What's systemd's excuse?

Systemd's excuse for what exactly?

Re:Systemd Home Directories by guerrilla on Monday February 10, 2020 @09:12AM (#22289209)
> shoving everything into the "cloud"
Re:Systemd Home Directories by viraptor on Monday February 10, 2020 @01:56PM (#22292046)
What's "everything" and got does it it try to shove it into the cloud?
Re:Systemd Home Directories by ta999999171 on Monday February 10, 2020 @12:32AM (#22286636)
> Microsoft and Google do this because they make money out of monetizing their users. What's systemd's excuse?

Who do you think is putting the resources (manhours/money/etc) into mainlining this crap into Linux? It's the corps. Add Intel to the list.

Re:Systemd Home Directories by crazy_hombre on Monday February 10, 2020 @09:08AM (#22289187)
You know you don't HAVE to use systemd-homed right? If it doesn't fit your use case, just keep doing what you're doing right now.
Re:Systemd Home Directories by ColanR on Monday February 10, 2020 @11:47AM (#22290737)
Why do people keep saying this? I don't see any reason to believe this won't come default in e.g. Ubuntu in the future, and it feels disingenuous for people to claim this is a permanently optional feature.
Re:Systemd Home Directories by throw0101a on Monday February 10, 2020 @01:29PM (#22291790)
> You know you don't HAVE to use systemd-homed right?

For now. Until GNOME pulls it in as a dependency.

Re:Systemd Home Directories by nickik on Monday February 10, 2020 @06:58AM (#22288354)
If you want to weaken your security then that's what you want to do. Then just don't use it.

And also, this is just the default, the mechanism is general, how to do this unlocking can be done in many ways by other people who want to use these tools.

Re:Systemd Home Directories by 0xffff2 on Monday February 10, 2020 @11:57AM (#22290867)
>You don't ever remotely log into your desktop??!

Is this really so common as to deserved two questions marks and an exclamation point? As one datapoint, if I've left files on my desktop at home that I need from work, I get fired.

Re:Systemd Home Directories by catalogia on Monday February 10, 2020 @07:22PM (#22294858)
I often log into my media server in my apartment to start a movie or tv show playing with mpv. Is that reasonable? I think that's a reasonable usecase. mpv is a perfectly suitable media player, and ssh is a perfectly suitable way to log into a computer. Why shouldn't I do this?

Is it what most "normal people" do? Of course not! Most normal people buy a spyware 'smart TV', roku, or some other proprietary appliance. So why the hell should the common habits of the general population be considered? If their habits are to be the guiding principle of the linux desktop, I'll soon have no reason to use the linux desktop.

Incidentally at one of my former (FANG) workplaces, each developer was given a RHEL workstation and a windows or mac laptop. Using ssh from one's laptop to access the workstation while in meetings, working from home (including oncall in the middle of the night), etc was common and permitted. This is not as crazy as you seem to think.

Re:Systemd Home Directories by Asooka on Monday February 10, 2020 @04:15PM (#22293453)
Yes? How else am I supposed to access my workstation remotely? Right now I just log in to the company VPN and ssh to my workstation when I need to do work from home. Remote access is a basic feature that has just worked on Linux since as far back as I can remember. And I remember when I had to twiddle the TV antenna to get good signal.
Re:Systemd Home Directories by 0xffff2 on Monday February 10, 2020 @04:32PM (#22293617)
Obviously we live in very different worlds. I am not supposed to access my workstation remotely. Again, if I managed to do it I would be fired.
Re:Systemd Home Directories by IcePic on Tuesday February 11, 2020 @12:57AM (#22296420)
But that is policy and nothing technical.
Re:Systemd Home Directories by jasonjayr on Sunday February 09, 2020 @10:17PM (#22286173)
I know the video had limited times, but in regards to enterprise authentication, is there any consideration to data ownership? In this scheme can the enterprise, or any superior device/data owner have a master key to decrypt home directory of a subordinate user?
Re:Systemd Home Directories by candiddevmike on Sunday February 09, 2020 @10:34PM (#22286238)
I do not believe so. The homectl docs state that the encryption password == user password without any alternative:

https://www.freedesktop.org/software/systemd/man/homectl.htm...

Re:Systemd Home Directories by jasonjayr on Sunday February 09, 2020 @10:42PM (#22286271)
Thanks for that link. I see further down that PKCS#11 is supported:

> Takes an RFC 7512 PKCS#11 URI referencing a security token (e.g. YubiKey or PIV smartcard) that shall be able to unlock the user account. The security token URI should reference a security token with exactly one pair of X.509 certificate and private key. A random secret key is then generated, encrypted with the public key of the X.509 certificate, and stored as part of the user record. At login time it is decrypted with the PKCS#11 module and then used to unlock the account and associated resources. See below for an example how to set up authentication with security token.

Key hierarchy management can probably be delegated to an external system.

Re:Systemd Home Directories by nullc on Sunday February 09, 2020 @11:18PM (#22286407)
FWIW, if you want to do dynamic mounted encrypted home you can do so today with pam_mount pretty easily. The two passwords can even disagree, you'll just get prompted twice during the login process.

In fedora, at least, it requires only three lines of configuration changes (adding the pam hooks, and setting up the mount point in the pam_mount config).

Re:Systemd Home Directories by throw0101a on Monday February 10, 2020 @01:33PM (#22291820)
> encryption password == user password

What if your password is in LDAP, and you change it the OpenLDAP back-end? Or if you have OpenLDAP talk to AD (via SASL) for password checks, but the rest of the GECOS & group is in LDAP? Is Kerberos covered? How is NFS handled? Automounts?

Doing a ^F I find no mention in the man page of either LDAP or Kerberos.

Re:Systemd Home Directories by neurobashing on Monday February 10, 2020 @09:00AM (#22289131)
my (possibly dumb) personal "conspiracy theory": some time in the relatively recent future there is going to be The Grand Linux Userspace Fork. There's going to be "SystemD with the Linux Kernel" (the SystemD system with Gnu utilities and the Linux kernel if you're into that sort of thing) and then "classic Linux", which is just "not using SystemD".

We already sorta have this now. What I'm (half-jokingly) suggesting is a big ugly fork a la Emacs/XEmacs, where the world visibly and somewhat incompatibly separates.

And like that fork we'll end up with everything more-or-less reconciling eventually, but it's going a weird ride until then.

Re:Systemd Home Directories by anonymou2 on Monday February 10, 2020 @10:21AM (#22289830)
there is devuan already
Re:Systemd Home Directories by ColanR on Monday February 10, 2020 @10:46AM (#22290056)
I agree. When that happens, I hope Wayland joins systemD, and I hope Linux somehow merges with plan 9. That, to me, would be ideal. Let Ubuntu play corporate, and leave the hackers in peace.

BTW, among other problems that the plan 9 paradigm alreay solved, I'm pretty sure they solved the security issues that Wayland was intended to solve, and from what I understand, I'm pretty sure they did a better job, too.

Re:Systemd Home Directories by johnny22 on Sunday February 09, 2020 @10:54PM (#22286314)
i don't see distros like debian ever using that as the default way, and there's no indication that the old way will disappear either.
Re:Systemd Home Directories by catalogia on Sunday February 09, 2020 @11:13PM (#22286387)
I hope you're right, but Debian has adopted other questionable SystemD defaults in the past, such as killing nohup'd processes when the user logs out (which is absolutely inane.)
Re:Systemd Home Directories by anonsivalley652 on Monday February 10, 2020 @12:04AM (#22286542)
Hence the Devuan fork but now the Debian is "exploring alternatives" to supporting multiple init systems. https://lists.debian.org/debian-devel-announce/2019/12/msg00...

My religious view, having started since the Slackware on CD days with original rc and experienced upstart, launchd, openrc, daemontools, runit, daemontools-encore and s6 is: SystemD does too much, has too many dependencies, does it awkwardly and is unfriendly to configuration management, robustness, troubleshooting, "least surprise" principle and simplicity.

If I were Debian devs, there are two choices to init-agnosticism: a) pick one init provider at a time or b) manage multiple init systems simultaneously. For the latter, a very simple meta-init process could either exec() the only init system if one is used or supervise 2+ init systems. Then, there would need to be a tool to manage the lifecycle of a service no matter which init system it belonged to.

It might be easier to pick a), but a common use-case is to use daemontools for custom or other services that need to be kept running. Granted, there are probably packages that already run daemontools, runit or daemontools-encore as a child under the existing system init.

It's times like these that I wish there were a capabilities-oriented standard file layout such that every service knew how to start, soft-stop, hard-stop, enable, disable, reload-config and validate-config itself rather than every N init system having to find magic command-line args to not spawn in the background, change the user/group and change the log level, ports, bound address(es) and log destination. And then Cfengine, augeas, puppet, chef, salt, etc. reimplemented all of that logic per service. Services should also know how to backup/restore/wipe their own data (if not a 12Factor service themselves), whether they're up/down and how to gather their own metrics... and then cacti, nagios, nrpe and so on implemented all of that sort of logic per service too. sigh Cross-cutting concerns should be managed at the place that knows best how to manage the data and process lifecycle best: per service. Then, once that's done in a standard way, /etc configuration and configuration management can customize away. Having each service become enumerable and discoverable like a Bluetooth profile is another matter.

Re:Systemd Home Directories by colechristensen on Monday February 10, 2020 @02:31AM (#22287112)
Systemd does something hard, easily arguably necessary, but it does not solve the problems well enough. I have similar feelings about containerization on Linux. I feel it comes down to lack of taste, or perhaps just the factioned nature of Linux distributions which are driven mostly by maintaining packaging instead of an operating system. Loo

Experimenting with FreeBSD has been a breath of fresh air. Things I've come to expect to take an extended amount of time figuring out just work out of the box.

Re:Systemd Home Directories by tifadg1 on Monday February 10, 2020 @07:33AM (#22288528)
Reading your last paragraph made me wonder if maybe systemd is suffering from the bike-shed affect - while barrier of entry to say kernel development is so that it detracts most bystanding naysayers, as far as systemd goes, it feels like a lot of people have a lot of different opinions because what systemd is doing is much easier comprehended than the aforementioned kernel.
Re:Systemd Home Directories by api on Sunday February 09, 2020 @11:19PM (#22286410)
What? I didn't even know about that. This stuff is such absolute trash.
Re:Systemd Home Directories by catalogia on Sunday February 09, 2020 @11:27PM (#22286441)
A lot of people (including me) learned about it the hard way when their tmux sessions began mysteriously disappearing. The solution is KillUserProcesses=no in /etc/systemd/logind.conf

Some systemd advocates say the critics are just upset at change. I don't dislike change in general, but changing defaults out from under me? Defaults like this? That irks me. I lost a several tmux sessions before I realized what was happening. I thought I was doing something wrong because SystemD violated my expectations so severely.

Re:Systemd Home Directories by loopz on Monday February 10, 2020 @12:26AM (#22286610)
Turns out some people like to force change upon others. They will always win out. These same people are oblivious to cause and effect.
Re:Systemd Home Directories by ColanR on Tuesday February 11, 2020 @03:24PM (#22302413)
I remember reading on HN at the time, how the systemD folks opened a bug report (or some such similar) on the tmux github because systemD was disappearing those tmux sessions, and their solution was for tmux to change how they managed persistency. Tmux stood their ground, and I think that's why KillUserProcesses=yes isn't still default. (iirc)
Re:Systemd Home Directories by api on Monday February 10, 2020 @08:15AM (#22288803)
A system-wide setting when the objective is user process control behavior? Really? Just wow.
Re:Systemd Home Directories by kuschku on Monday February 10, 2020 @10:47AM (#22290073)
multi-user system, user logs out, do you want to have buggy software still hanging around?

The whole point is for the administrators to be able to avoid users running long-running processes on shared systems (e.g. university systems).

Re:Systemd Home Directories by JohnFen on Monday February 10, 2020 @12:14PM (#22290995)
> multi-user system, user logs out, do you want to have buggy software still hanging around?

Of course not. But I do want to have the nohup software they have running to keep running when they log out.

> The whole point is for the administrators to be able to avoid users running long-running processes on shared systems (e.g. university systems).

Right, which is why it should be possible to do this. The issue is that the default behavior has changed from honoring nohup to not honoring nohup. Defaulting to honoring nohup is what's expected, and is reasonable.

Re:Systemd Home Directories by yori on Monday February 10, 2020 @07:06AM (#22288400)
Why did the sessions disappear? Can you explain more about it?
Re:Systemd Home Directories by fsh on Monday February 10, 2020 @08:19AM (#22288825)
Systemd can be configured to kill all processes belonging to a user when he or she closes the last login shell. Some people had this enabled on their servers and were surprised that their tmux/screen sessions kept disappearing.
Re:Systemd Home Directories by seabird on Monday February 10, 2020 @09:05AM (#22289164)
This is a bit disingenuous; people didn't just "have it enabled", it was made a default despite a lot of concern that it was such a radical departure from the normal behavior.
Re:Systemd Home Directories by fgonzag on Monday February 10, 2020 @05:47PM (#22294252)
Some people? Do you mean everyone who's distro did not change the default value?
Re:Systemd Home Directories by oarsinsync on Monday February 10, 2020 @09:37AM (#22289425)
It may have passed you by as it did me. It looks like either systemd or debian changed course and changed the default for KillUserProcesses to no.
Re:Systemd Home Directories by NikolaeVarius on Sunday February 09, 2020 @09:59PM (#22286072)
Dont use it then
Re:Systemd Home Directories by ta999999171 on Monday February 10, 2020 @12:33AM (#22286639)
"Just leave the country if you don't like it."
Re:Systemd Home Directories by claudiawerner on Monday February 10, 2020 @04:32AM (#22287624)
This idea is actually quite old; Socrates himself said this when a friend offered to break him out of prison. Socrates' argument was that if he didn't like the laws of Athens he could have gone somewhere else, but by staying in Athens he consented to its laws, so it was not his right to break out now, and he should have to face his sentence of death.
Re:Systemd Home Directories by akvadrako on Monday February 10, 2020 @03:19AM (#22287285)
It’s an optional feature. I doubt many people will use it.
Re:Systemd Home Directories by nickik on Monday February 10, 2020 @06:54AM (#22288331)
> how long till this is the one true way

It not supposed to be the 'true' way. Its supposed to be an option for specific envoirmentments.