Results 1 to 8 of 8

Thread: 22.04 fresh install won't recognise existing home folder - login loop

  1. #1
    Join Date
    Jul 2010
    Beans
    104

    22.04 fresh install won't recognise existing home folder - login loop

    I put this on AskUbuntu yesterday but no replies yet - can anyone help with this please?


    I upgraded xubuntu 18.04 LTS to 22.04 LTS. Laptop is elderly but trusty Lenovo T400. I have an encrypted home folder which I kept on a separate partition (mount point /home). Install seemed to go fine. However when I went to log in I got caught in the dreaded login loop.

    I can log in to TT3 through ctrl + alt + F3. I can create new users - everything works for them.

    To fix my main account I have tried every tip I could find:



    • changed owner of /home/[username] with chown so it is correct
    • checked there is space in partitions,
    • uninstall and reinstall xubuntu-desktop,
    • turning on and reconfiguring lightdm (sudo dpkg-reconfigure lightdm), ubuntu-drivers,
    • deleting .Xauthority folder. (when I tried startx it seemed to time out. If I can work out how I will upload the output but still figuring that out).
    • installing the lubuntu desktop but that didn't solve it.


    Can anyone suggest other solutions or guide me through a fix please? I can usually muddle through but not a tech so full steps and clear explanations will be needed please


    Thanks in advance!

  2. #2
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 24.04 Noble Numbat

    Re: 22.04 fresh install won't recognise existing home folder - login loop

    I don't use nor do I know much about encryption of /home partitions but please give all details of the encryption used and how you set it up originally in 18.04.

  3. #3
    Join Date
    Jul 2010
    Beans
    104

    Re: 22.04 fresh install won't recognise existing home folder - login loop

    Hmm some time ago so not sure I recall all the details. It's encrypted with ecryptfs, I probably did it after install like these instructions.

    At no point am I being prompted for the passkey, but have used the same login so wouldn't expect to. And there is no problem with space in the partitions

    Thank you for responding!

  4. #4
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: 22.04 fresh install won't recognise existing home folder - login loop

    'ecryptfs' died... Sorry.

    And yes... It's in a login loop because it can't read the Home (encrypted/locked) to be able to find the User's .Xauthority file.

    Ubuntu moved away from ecryptfs between 18.04 and 20.04, and moved from ecryptfs encryption to LUKS full partition encryption. There was problems with ecryptfs and it's upstream Project.
    re: https://medium.com/@chrishantha/encr...4-b50bfc65182a
    Since Ubuntu 18.04 LTS release, Ubuntu installation no longer offers you to encrypt your home folder using eCryptfs during installation. Instead, it offers to encrypt your entire hard disk. However, this option to encrypt the Ubuntu installation is only enabled if you chose to erase your disk and install Ubuntu. <May 15, 2019>
    At that time, AskUbuntu was flooded with questions on what to do... So your question there will probably be re-directed as a duplicate to one of those 4 year old questions. It's been answered many times.

    Here is a one:
    https://askubuntu.com/questions/4950...ory-encryption
    https://askubuntu.com/questions/1711...a-with-live-cd

    Linux kernel also dropped support for ecryptfs in kernel, as it had no maintainers and was orphaned: https://lore.kernel.org/lkml/2023040...li@vivo.com/T/ So in the very near future, I am guessing that it 'will' disappear completely. It's days are numbered.

    Did you take good backups before you upgraded the release(s)? As I remember, the release notes told people to backup the affected as clear unencrypted and restore to the new drive... But it's been a awhile.

    If you didn't, package ecrypt-utils is still in the repo's for focal and jammy, you could chroot into the installed system from a LiveUSB... Install it, set it up... then backup your data, so you could either restore it to a regular filesystem, or restore it to a LUKS encrypted partition. Which it sounds like you have the whole partition encrypted right? Not just an encrypted folder right?

    It still exists, and the toolset still exists so far. I would do that before it does go away completely. It will.

    If you still need or desire encryption, please look into LUKS2. I do this manually in my installs, by jumping out to the system console and setting it up like I want it to be, then back into the installer to use the partitioner in 22.04, to connect the mounts... Which that partitioner is filesystem/file manager aware, unlike the new ubuntu-desktop-installer Snap, which I still have an open bug report filed on that new partitioner...) On drives further down the tree branch, I use key - store files encrypted on the root, pointed to in the crypttab file to unlock the other partitions, so I only have to be prompted once, or use a USB key that contains the key files as multi-factor authentication.
    Last edited by MAFoElffen; October 2nd, 2023 at 05:27 AM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  5. #5
    Join Date
    Jul 2010
    Beans
    104

    Re: 22.04 fresh install won't recognise existing home folder - login loop

    Quote Originally Posted by MAFoElffen View Post
    'ecryptfs' died... Sorry.

    And yes... It's in a login loop because it can't read the Home (encrypted/locked) to be able to find the User's .Xauthority file.

    Ubuntu moved away from ecryptfs between 18.04 and 20.04, and moved from ecryptfs encryption to LUKS full partition encryption. There was problems with ecryptfs and it's upstream Project.
    re: https://medium.com/@chrishantha/encr...4-b50bfc65182a
    Ah thank you for the info, makes sense. Think I was unfortunate with timings and hadn't noted this (or needed to think about encryption at all, it was just "there"). Somehow i managed to get round it without difficulty when I upgraded my other laptop but that was some time ago. And when I hit similar problems with the other laptop (Ubuntu rather than Xubuntu, and simple update caused it rather than fresh install) over the summer I think uninstall and reinstall of ubuntu-desktop solved it. Home folder contents on the Xubuntu laptop would be nice to have but not critical. A cautionary tale for future upgrades!

    I appreciate the response, will have a go at recovering data on Home and start again...

  6. #6
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: 22.04 fresh install won't recognise existing home folder - login loop

    Te second of the two links I posted from AskUbuntu has instructions on unlocking your encrypted ecryptfs volume and recovering the data you will need. I figured that would help you to do that on yours.

    Good luck and have fun. Please Keep us updated on how that goes for you. Routing for your success.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  7. #7
    Join Date
    Jul 2010
    Beans
    104

    Re: 22.04 fresh install won't recognise existing home folder - login loop

    Quote Originally Posted by MAFoElffen View Post
    Te second of the two links I posted from AskUbuntu has instructions on unlocking your encrypted ecryptfs volume and recovering the data you will need. I figured that would help you to do that on yours.

    Good luck and have fun. Please Keep us updated on how that goes for you. Routing for your success.
    Success - easier than I expected. Solution was, I installed ubuntu-desktop (OK not ideal...) and logged in with that by clicking the small xubuntu icon at top right on the xubuntu login screen (may have selected Wayland, not sure now, I can't recall - see later comment about .Xauthority). It booted without issues. I had a home folder and the .private hidden folder which is encrypted. However the .private folder was gobbledegook (encrypted so unusable) and for some reason recovery instructions didn't work, it wouldn't accept the passphrase.

    But then I noticed my home folder had a hidden .Xauthority file in it, and I wondered if this was a new one. It didn't look encrypted, so I got to thinking, perhaps xubuntu login might recognise it and work now...

    So I logged out, logged in with xubuntu and all my files are visible again in my home folder.

    Not sure why this worked. I had to choose default display either lightdm or SDDM during the ubuntu-desktop install, perhaps that prompted a reconfig of lightdm (though I had tried that before. Anyways thought I would leave this here in case anyone else finds it useful Will defintely consider migtrating to LUKS tho.

    Thanks again MAFoElffen

  8. #8
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: 22.04 fresh install won't recognise existing home folder - login loop

    You are welcome. Glad that this all worked out for you.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •