Broke LM 18.2 login

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
NetUzi
Level 1
Level 1
Posts: 4
Joined: Fri Nov 10, 2017 11:39 am

Broke LM 18.2 login

Postby NetUzi » Fri Nov 10, 2017 2:33 pm

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-delete-user-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

User avatar
JerryF
Level 7
Level 7
Posts: 1628
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Broke LM 18.2 login

Postby JerryF » Fri Nov 10, 2017 4:00 pm

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.
Don't forget to edit your original post and add [SOLVED] to the beginning of the Subject line if your problem has been fixed.
My main language is English. I speak very little Portuguese, and a whole lot of gibberish.

NetUzi
Level 1
Level 1
Posts: 4
Joined: Fri Nov 10, 2017 11:39 am

Re: Broke LM 18.2 login

Postby NetUzi » Sat Nov 11, 2017 6:31 pm

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 7
Level 7
Posts: 1628
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

Re: Broke LM 18.2 login

Postby JerryF » Sat Nov 11, 2017 7:37 pm

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. :(
Don't forget to edit your original post and add [SOLVED] to the beginning of the Subject line if your problem has been fixed.
My main language is English. I speak very little Portuguese, and a whole lot of gibberish.

NetUzi
Level 1
Level 1
Posts: 4
Joined: Fri Nov 10, 2017 11:39 am

Re: Broke LM 18.2 login

Postby NetUzi » Wed Nov 15, 2017 5:03 pm

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

Mute Ant
Level 12
Level 12
Posts: 4106
Joined: Tue Sep 03, 2013 7:45 pm

Re: Broke LM 18.2 login

Postby Mute Ant » Wed Nov 15, 2017 6:01 pm

"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.
Armageddon only happens once, you know. They don’t let you go around again until you get it right.


Return to “Newbie Questions”