Broke LM 18.2 login

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
NetUzi

Broke LM 18.2 login

Post by NetUzi »

Hi, everyone. This is roughly what happened between yesterday's evening and today's breakfast (not very scientific, ask whatever you need to know):
// 5yo kiddo wants to play Minetest in LM 18.2 in mom's LUKS encrypted laptop with strong password. Kiddo playing off and on; LM prompts for password. Mom decides to disable password from GUI.

Code: Select all

$ bad@FISH
From MATE's GUI, I've navigated the settings and found my way to disable password at login and when screen fades. Mom powers off laptop at night. Next boot:
{(login manager) user 'bad' prompted to access (w/o password, just access) or Guest Session > Select 'bad' (only user) > Mom hits Enter key...}

loop: { ... }
(login manager) user 'Guest' prompted to access (w/o password, just access)... > Mom hits Enter key...
No Internet connection in Guest session (networks are available, but network manager just drops the connection immediately). Cannot access local 320GB LUKS-encrypted partition either due to lack of permissions.
Mom then accesses tty2 (user:bad+password:*****************) :

Code: Select all

# passwd --delete bad 
Exit root 
$ startx 
Nothing useful (CLI displays message too damn fast).

Code: Select all

startx
again, and again (frantically). Same outcome.
Entered tty7 (GUI)

{(login manager) user 'bad' prompted to access (w/o password, just access) or Guest Session > Select 'bad' (@FISH's only user) > Mom hits Enter key...}
Same ol'loop. Now we've broken LM in a new and exciting way!

EDIT: Forgot to mention this!

Code: Select all

# usermod -s /usr/sbin/nologin bad
# passwd -d bad ## (just in case)
...as seen in https://www.cyberciti.biz/faq/linux-del ... -password/
I've tried helping mom using BunsenLabs' live session. My idea is backup small (but important) potatoes of the encrypted disk with Thunar.
(Thunar) Drive asks for password > Right phrase provided yet no access.
We need to back up disk and reinstall ASAP and cannot afford to lose any more uptime or the academic content. What is the next thing to do now? I feel like a Flintstone.


Thanks in advance
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
JerryF
Level 16
Level 16
Posts: 6571
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Broke LM 18.2 login

Post by JerryF »

I think instead of trying to delete the password, you should try enabling the password. Because the partition is encrypted, you need to login with the same username and password.
NetUzi

Re: Broke LM 18.2 login

Post by NetUzi »

JerryF wrote:I think instead of trying to delete the password, you should try enabling the password. Because the partition is encrypted, you need to login with the same username and password.
You must be right. The thing is we cannot enter any LM session now, not even from tty. Can you point me to any direction?
User avatar
JerryF
Level 16
Level 16
Posts: 6571
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Broke LM 18.2 login

Post by JerryF »

NetUzi wrote:
JerryF wrote:I think instead of trying to delete the password, you should try enabling the password. Because the partition is encrypted, you need to login with the same username and password.
You must be right. The thing is we cannot enter any LM session now, not even from tty. Can you point me to any direction?
I truly wish I could, but I don't know how. My knowledge of Linux is not sophisticated enough. :(
NetUzi

Re: Broke LM 18.2 login

Post by NetUzi »

I'll post as soon as we can find the way to access that partition in case anyone profits. Thanks.
Mute Ant

Re: Broke LM 18.2 login

Post by Mute Ant »

"find the way to access that partition" Like this, on Mint 18.3. I am assuming the encrypted OS is a standard install with boot in /dev/sda1 and LVM-on-LUKS in /dev/sda5. If it isn't, you will need to determine the proper handle for the LUKS partition and use it instead of /dev/sda5. The lsblk command shows clues, so does the gparted program or gnome-disks, you want the partition that has a LUKS header.

o Boot a Live Session DVD or USB of Mint using your broken machine.

o Open a GUI console window, a terminal.

o Unlock the LUKS container... sudo cryptsetup open /dev/sda5

o Activate LVM physical volumes... sudo lvm pvscan

o Activate LVM volume groups... sudo lvm vgscan

o Activate LVM logical volumes... sudo lvm lvscan

o Mount the broken OS partition... sudo mount /dev/mint-vg/root /root
in older Mints this was /dev/mapper/mint--vg-root so go with what you have and mount what the lvscan says exists.

That leaves you with all the LUKS encrypted files on open view in the /root directory of the Live Session.

o Backup anything unique that you want to keep. You can use the Live Session File Manager for that. If, by some unfortunate chance, there is home-folder encryption too, the /home folder should be copied entire to some other store.
Locked

Return to “Beginner Questions”