Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Friday May 01 2020, @11:04AM   Printer-friendly
from the resistance-is-futile.-/home-will-be-assimilated dept.

Good News:

Linux home directory management is about to undergo major change:

With systemd 245 comes systemd-homed. Along with that, Linux admins will have to change the way they manage users and users' home directories.

[...] Prior to systemd every system and resource was managed by its own tool, which was clumsy and inefficient. Now? Controlling and managing systems on Linux is incredibly easy.

But one of the creators, Leannart Poettering, has always considered systemd to be incomplete. With the upcoming release of systemd 245, Poettering will take his system one step closer to completion. That step is by way of homed.

[...] let's take a look at the /home directory. This is a crucial directory in the Linux filesystem hierarchy, as it contains all user data and configurations. For some admins, this directory is so important, it is often placed on a separate partition or drive than the operating system. By doing this, user data is safe, even if the operating system were to implode.

However, the way /home is handled within the operating system makes migrating the /home directory not nearly as easy as it should be. Why? With the current iteration of systemd, user information (such as ID, full name, home directory, and shell) is stored in /etc/passwd and the password associated with that user is stored in /etc/shadow. The /etc/passwd file can be viewed by anyone, whereas /etc/shadow can only be viewed by those with admin or sudo privileges.

[...] Poettering has decided to make a drastic change. That change is homed. With homed, all information will be placed in a cryptographically signed JSON record for each user. That record will contain all user information such as username, group membership, and password hashes.

Each user home directory will be linked as LUKS-encrypted containers, with the encryption directly coupled to user login. Once systemd-homed detects a user has logged in, the associated home directory is decrypted. Once that user logs out, the home directory is automatically encrypted.

[...] Of course, such a major change doesn't come without its share of caveats. In the case of systemd-homed, that caveat comes by way of SSH. If a systemd-homed home directory is encrypted until a user successfully logs in, how will users be able to log in to a remote machine with SSH?

The big problem with that is the .ssh directory (where SSH stores known_hosts and authorized_keys) would be inaccessible while the user's home directory is encrypted. Of course Poettering knows of this shortcoming. To date, all of the work done with systemd-homed has been with the standard authentication process. You can be sure that Poettering will come up with a solution that takes SSH into consideration.

Older articles:

Will systemd be considered complete once the kernel and boot loader have been absorbed into systemd?


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 1) by shrewdsheep on Friday May 01 2020, @11:48AM (12 children)

    by shrewdsheep (5215) on Friday May 01 2020, @11:48AM (#988873)

    Your only chance is to retreat. I have long given up on defending my home folder. Too many programs just write stuff wherever they see fit. Programs even start invading the Documents folder. I have now my own subfolder in home (the name of which I keep a secret) that I call my very home (whoever touches it, gets nuked).

  • (Score: 5, Interesting) by bzipitidoo on Friday May 01 2020, @12:53PM (10 children)

    by bzipitidoo (4388) on Friday May 01 2020, @12:53PM (#988906) Journal

    Huh, that's what I've done. My real home directory is a subdirectory I created in /home/me. Too many programs want to clutter up the home directory and the official subdirectories. If I use the home directory the system set up, makes it difficult to tell which files and subdirectories are mine.

    I found it useful to break the big stuff out separately. Video I made goes in a separate subdirectory.

    I got another idea that helps me stay more organized. I made /home/me/tmp for my own temporary stuff. Anything I put in there is subject to deletion, but not by any system process, only by me, when I'm ready. Makes me think about whether I want to keep something when I'm creating it.

    • (Score: 0) by Anonymous Coward on Friday May 01 2020, @01:01PM (5 children)

      by Anonymous Coward on Friday May 01 2020, @01:01PM (#988913)

      Bbut... where do you put Pictures? And Videos? And Templates? That recreate if you delete them. It doesn't make any sense?!

      • (Score: 4, Informative) by Arik on Friday May 01 2020, @01:39PM (1 child)

        by Arik (4543) on Friday May 01 2020, @01:39PM (#988941) Journal
        "That recreate if you delete them. It doesn't make any sense?!"

        When this happens;

        1. Figure out which program is doing it.
        2. Check if this is a configuration option.
        3. a. If it is, fix the config.
           b. If it is not, remove the program.
        --
        If laughter is the best medicine, who are the best doctors?
        • (Score: 2) by meustrus on Friday May 01 2020, @07:35PM

          by meustrus (4961) on Friday May 01 2020, @07:35PM (#989138)

          Naw, if something keeps messing with your files, it's too late. They've been found. If you didn't tell the software where those files are, they were discovered by some "convention".

          If your software does something you don't like, don't fight it. Let it do its thing. Move your stuff somewhere safe. Like GP suggests.

          /home has been pwned since it was first invented. Any files that software messes with belong to the machine now. Keep your stuff somewhere safe.

          Heck, the homed idea would actually be pretty slick if it didn't involve breaking the world and asserting control. Auto-mount an encrypted drive that belongs to the user at login? Awesome! Just don't touch anything inside it.

          --
          If there isn't at least one reference or primary source, it's not +1 Informative. Maybe the underused +1 Interesting?
      • (Score: 0) by Anonymous Coward on Friday May 01 2020, @11:28PM (1 child)

        by Anonymous Coward on Friday May 01 2020, @11:28PM (#989258)

        A lot of programs will place their files wherever you tell them your $HOME is. You can alias the cd command, with no arguments, to cd /home/username , so that it appears to be working more or less as normal. I'm sure there are some programs out there that won't like it, but anything written correctly should function just fine and for anything that's important, you should be able to have the program place the files where you want them via symlinks or just changing the configuration.

        It's astonishing to me, how little knowledge and creativity people have about these things. This isn't Windows, or god forbid, OSX, you can change these things if you really want to.

        • (Score: 0) by Anonymous Coward on Saturday May 02 2020, @12:08PM

          by Anonymous Coward on Saturday May 02 2020, @12:08PM (#989427)

          Not to give the pots too much credit, but he did co-author the XDG_ environment spec that enables you to further manipulate where .config .local .cache and such goes... if programs respect them.

      • (Score: 1) by drgibbon on Saturday May 02 2020, @08:26PM

        by drgibbon (74) on Saturday May 02 2020, @08:26PM (#989577) Journal

        You can define the locations of those in ~/.config/user-dirs.dirs

        E.g., XDG_VIDEOS_DIR="$HOME/media/videos"

        or whatever you like [archlinux.org].

        --
        Certified Soylent Fresh!
    • (Score: 2, Interesting) by shrewdsheep on Friday May 01 2020, @01:03PM (2 children)

      by shrewdsheep (5215) on Friday May 01 2020, @01:03PM (#988915)

      I made /home/me/tmp for my own temporary stuff

      Huh, that's what I've done.

      Let me do some mind-reading: you only backup that subfolder of yours together with some select folder from home (.ssh, some stuff from .config). Your large stuff (Music/Videos) go into different backups than the rest of the files (the latter are backupped incrementally and being encrypted, but my crystal is a bit blurred on that). Finally, some important application config files are moved to your private home and symbolically linked to their expected location.

      • (Score: 3, Interesting) by Grishnakh on Friday May 01 2020, @02:59PM (1 child)

        by Grishnakh (2831) on Friday May 01 2020, @02:59PM (#988994)

        Interesting, but I don't see the point in backing up Music/Videos separately. Personally, I just backup my home dir onto portable USB drives using rsync. The large stuff doesn't change often, so it doesn't take any time to backup unless you've changed it. Even if you use some kind of snapshotting backup program, this would still be the case.

        The biggest problem I have with home dirs is that large desktop environments typically keep a lot of crap buried in some dot-directory like .config, and then when they update to a new version, something in there breaks (the new version doesn't read the old config file correctly, and madness ensues). The standard advice from the DE maintainers is to simply wipe out your entire home directory and start over....

        • (Score: 3, Interesting) by bzipitidoo on Friday May 01 2020, @06:04PM

          by bzipitidoo (4388) on Friday May 01 2020, @06:04PM (#989083) Journal

          Backing up video, images, and music separately made more sense when I started that system, which was when a big flash drive was 1G, and I still sometimes used CD-Rs and CD-RWs. I even tried those Iomega Zip drives. Lost everything to their infamous Click Of Death problem.

          One hint that everyone else had moved on from CDs was that in newer kernels, I encountered several bugs related to their use. There was a problem with the type of optical media from kernel version 2.6.6 through 2.6.8 -- CD-Rs did not work, but CD-RWs were fine. If I was the first to discover these problems, that had to mean no one else was still using that hardware. More recently, I learned that 2.6.25 is the last version that can handle 40 wire PATA cables. Better find an 80 wire cable if you want to run a newer kernel on such old hardware.

    • (Score: 2) by Reziac on Saturday May 02 2020, @02:43AM

      by Reziac (2489) on Saturday May 02 2020, @02:43AM (#989310) Homepage

      I've done that since forever, on every OS. I sort my shit out where I want it, somewhere the OS doesn't use and doesn't officially know about. That way there's never confusion or argument.

      --
      And there is no Alkibiades to come back and save us from ourselves.
  • (Score: 0) by Anonymous Coward on Sunday May 03 2020, @08:21AM

    by Anonymous Coward on Sunday May 03 2020, @08:21AM (#989720)

    Same for Windows 10. It puts your 'home' with a bunch of stupid junctions that WILL delete or corrupt data. Can't they just have normal folders?

    I have learnt to only use /home (Users) in Windows for temporary files. Create a folder someone where, preferably on a different drive, for long term storage. Or anything you want to keep when Windows blats your C: data.

    Some things never change. Never thought I'd see this in *nix.