Locked out of account - please help!

I am not saying you should reinstall - in fact any live linux can be used - the only thing you have to do is to mount the manjaro root partition from a live system.

Then copy the backup files back to undo the changes you made with the pacnew files.

The rough guide is

  • boot a live Linux ISO
  • open a root terminal
  • mount your root partition
    • if you are running a default EFI system the partition will most likely be /dev/sda2 or /dev/nvme0n1p2 (pure guess work)

List partitions

lsblk

Replace sdyX with the partition of your system

mount /dev/sdyX /mnt

Move into the etc folder of the mounted partition

cd /mnt/etc

compare the content of the backup files with their current equivalents

cat shadow
cat shadow-

and

cat passwd
cat passwd-

If you are confident the backups are ok

cp passwd- passwd
cp shadow- shadow

Move out of the partition and unmount the partition

cd 
umount /mnt

Then remove the stick and reboot

reboot
1 Like