The root account is locked

(However I didn’t do it)

Hello fellow Kaisens,

After taking a short break I come back to a black screen with just a moving cursor and nothing else. Nothing was installed, nor any updates were made.
After rebooting it gives me my standard grub options and a logon screen after I choose Kaisen GNU/Linux , with Linux 6.5.0-1kaisen-amd64

I have also 6.1.0 and 5.19.0 preinstalled on the machine but upon entering credentials at login screen the result is the same - just a black screen with a moving cursor and nothing else.

If I enter either of the recovery modes I get a more verbose process of loading the system which culminates in:
Cannot open access to console, the root account is locked.
See sulogin(8) man page for more details.
Press Enter to continue.

So I do, because there is no prompt to enter anything else and it takes me back to the black screen. Other forums don’t seem much of help.

Any suggestions are appreciated.

Hello,

For security reasons, the root account locked on Kaisen.

To unlock it please follow :

Tutorial: Chroot into a Linux System with LVM and Optional Encryption

Prerequisites:

  • A Linux system installed on an LVM (Logical Volume Management) volume.
  • A live CD or USB with a Linux distribution to access the system in live mode.

Step 1: Boot from the Live CD/USB

Insert the live CD/USB and boot the computer from this media. Make sure to select the appropriate option to boot in live mode.

Step 2: Open a Terminal

Once in the live environment, open a terminal.

Step 3: Determine mount sources

Identify the volume group (VG) and logical volumes (LV) of your Linux installation using the following command:

bashCopy code

lsblk

You shoukd have something similar :

bashCopy code

sda                      8:0    0 476.9G  0 disk  
├─sda1                   8:1    0   121M  0 part  /boot/efi
├─sda2                   8:2    0   488M  0 part  /boot
└─sda3                   8:3    0 476.3G  0 part  
  └─sda3_crypt         254:0    0 476.3G  0 crypt 
    ├─nikilab--vg-root 254:1    0  37.3G  0 lvm   /snap
    │                                             /
    └─nikilab--vg-home 254:2    0   439G  0 lvm   /home

Step 4: Mount the Root File System

Mount the logical volume corresponding to your root file system in the /mnt directory. Replace VG_NAME and LV_NAME with the appropriate names. Do note forget your other partitions lile /boot and EFI

bashCopy code

sudo mount /dev/VG_NAME/LV_NAME /mnt
sudo mount /dev/sda2 /mnt/boot
sudo mount /dev/sda1 /mnt/boot/efi

Step 5: Mount System Directories

Mount the necessary special filesystems in the /mnt directory. Execute the following commands:

bashCopy code

sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount --bind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars

Step 6 (Optional): Decrypt the LVM

If your LVM is encrypted, use the following command to decrypt . Replace LV_NAME with the name of the logical volume to be encrypted.

bashCopy code

sudo cryptsetup luksOpen /dev/VG_NAME/LV_NAME cryptroot

Step 8: Chroot into the Installed System

Chroot into the installed system with the mounted system directories:

bashCopy code

sudo chroot /mnt /bin/bash

Step 9: Unlock root

bashCopy code

passwd -u root

Step 10: Exit the Chroot

Once finished, exit the chroot and unmount the mounted filesystems:

bashCopy code

exit
sudo umount -R /mnt

Thank you for your reply, Niki. Unfortunately the not much has changed: logon screen, then black background with cursor and nothing else. Am I doing this right?

kaisen@kaisenlinux ~ $ pwd
/home/kaisen
kaisen@kaisenlinux ~ $ cd /
kaisen@kaisenlinux / $ sudo fdisk -l
Disk /dev/sdb: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WD Blue SA510 M.
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1492befc

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 104447 102400 50M 7 HPFS/NTFS/exFAT
/dev/sdb2 104448 408513614 408409167 194.7G 7 HPFS/NTFS/exFAT
/dev/sdb3 408514560 409599999 1085440 530M 27 Hidden NTFS WinRE
/dev/sdb4 409602046 1953523711 1543921666 736.2G 5 Extended
/dev/sdb5 409602048 472100863 62498816 29.8G 82 Linux swap / Solaris
/dev/sdb6 * 472102912 785575935 313473024 149.5G 83 Linux
/dev/sdb7 785577984 1953523711 1167945728 556.9G 7 HPFS/NTFS/exFAT

Disk /dev/sda: 7.32 GiB, 7864320000 bytes, 15360000 sectors
Disk model: DataTraveler 2.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xb1db55e9

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 64 11396699 11396636 5.4G 17 Hidden HPFS/NTFS
/dev/sda2 11396700 11398491 1792 896K 1 FAT12

Disk /dev/loop0: 4.94 GiB, 5299118080 bytes, 10349840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
kaisen@kaisenlinux / $ sudo mount /dev/sdb6 /mnt
kaisen@kaisenlinux / $ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 4.9G 1 loop /usr/lib/live/mount/rootfs/filesystem.squashfs
/run/live/rootfs/filesystem.squashfs
sda 8:0 1 7.3G 0 disk
├─sda1 8:1 1 5.4G 0 part /usr/lib/live/mount/medium
│ /run/live/medium
└─sda2 8:2 1 896K 0 part
sdb 8:16 0 931.5G 0 disk
├─sdb1 8:17 0 50M 0 part
├─sdb2 8:18 0 194.7G 0 part
├─sdb3 8:19 0 530M 0 part
├─sdb4 8:20 0 1K 0 part
├─sdb5 8:21 0 29.8G 0 part
├─sdb6 8:22 0 149.5G 0 part /mnt
└─sdb7 8:23 0 556.9G 0 part
kaisen@kaisenlinux / $ sudo chroot /mnt /bin/bash
root@kaisenlinux / # passwd -u root
passwd: password changed.
root@kaisenlinux / # exit
exit
kaisen@kaisenlinux / $ sudo umount -R /mnt
kaisen@kaisenlinux / $ sudo reboot

Thank you again.

Sorry, I may have missed a step. This is the new one.

kaisen@kaisenlinux ~ $ sudo su
root@kaisenlinux /home/kaisen # pwd
/home/kaisen
root@kaisenlinux /home/kaisen # cd /
root@kaisenlinux / # fdisk -l
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WD Blue SA510 M.
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1492befc

Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 104447 102400 50M 7 HPFS/NTFS/exFAT
/dev/sda2 104448 408513614 408409167 194.7G 7 HPFS/NTFS/exFAT
/dev/sda3 408514560 409599999 1085440 530M 27 Hidden NTFS WinRE
/dev/sda4 409602046 1953523711 1543921666 736.2G 5 Extended
/dev/sda5 409602048 472100863 62498816 29.8G 82 Linux swap / Solaris
/dev/sda6 * 472102912 785575935 313473024 149.5G 83 Linux
/dev/sda7 785577984 1953523711 1167945728 556.9G 7 HPFS/NTFS/exFAT

Disk /dev/sdb: 7.32 GiB, 7864320000 bytes, 15360000 sectors
Disk model: DataTraveler 2.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xb1db55e9

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 64 11396699 11396636 5.4G 17 Hidden HPFS/NTFS
/dev/sdb2 11396700 11398491 1792 896K 1 FAT12

Disk /dev/loop0: 4.94 GiB, 5299118080 bytes, 10349840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
root@kaisenlinux / # mount /dev/sda6 /mnt
root@kaisenlinux / # ls /mnt
bin dev home initrd.img.old lib32 lost+found mnt proc run snap sys usr vmlinuz
boot etc initrd.img lib lib64 media opt root sbin srv tmp var vmlinuz.old
root@kaisenlinux / # mount --bind /dev /mnt/dev
root@kaisenlinux / # mount --bind /proc /mnt/proc
root@kaisenlinux / # mount --bind /sys /mnt/sys
root@kaisenlinux / # mount --bind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars
root@kaisenlinux / # cryptsetup luksOpen /dev/sda6 cryptroot
Device /dev/sda6 is not a valid LUKS device.
root@kaisenlinux / # chroot /mnt /bin/bash
root@kaisenlinux / # passwd -u root
passwd: password changed.
root@kaisenlinux / # exit
exit
root@kaisenlinux / # umount -R /mnt
root@kaisenlinux / # ls /mnt
root@kaisenlinux / #

But regardless, result is the same: blank black desktop with a cursor and nothing else.

What am I missing? All of the system is on the sda6, no encryption. Any chance to roll back?

Thank you for your support.

Good afternoon.

This is getting absurd. I don’t remember what I did in November to solve this, but the issue remains. I looked in other sources and people have recommended to correct /etc/fstab from live environment. Namely, remove removable devices. What this did - was removing Graphical Environment, and the only thing left was CLI. And the same message again: root account is locked.

I haven’t encrypted my drive and I don’t know what LVM has to do with it. Can you please help?

Device Start End Sectors Size Type
/dev/sda1 2048 206847 204800 100M EFI System
/dev/sda2 206848 239615 32768 16M Microsoft reserved
/dev/sda3 239616 562114224 561874609 267.9G Microsoft basic data
/dev/sda4 562114560 563199999 1085440 530M Windows recovery environment
/dev/sda5 563200000 567273471 4073472 1.9G BIOS boot
/dev/sda6 567273472 976873471 409600000 195.3G Linux filesystem
/dev/sda7 976873472 1953523711 976650240 465.7G Microsoft basic data

The root FS is on /dev/sda6.

Thank you.

Rei.

Hello,

I think you are in the emergency mode.

Can you restore a snapshot?