So after last update I also wanted to manage .pacnew. However, I did not fully know what I was doing and continued anyways to replace files. This resulted in me not being able to log in after reboot (my password and fingerprint simply stopped working).
Now I do not know anymore which files I changed. But I do have timeshift backups!
I am already booted into a live USB and have my external timeshift drive connected and recognised.
My system is dual boot using grub. I have 7 partitions on my internal drive, one of which contains my manjaro system (nvme0n1p7).
The output of fdisk -l is
Disk /dev/nvme0n1: 953,87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: WDC PC SN730 SDBQNTY-1T00-1001
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: gpt
Disk identifier: 43F627DE-5AE9-42CB-B72E-32D522CCF294
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 534527 532480 260M EFI System
/dev/nvme0n1p2 534528 567295 32768 16M Microsoft reserved
/dev/nvme0n1p3 567296 974360575 973793280 464,3G Microsoft basic data
/dev/nvme0n1p4 1998360576 2000408575 2048000 1000M Windows recovery environme
/dev/nvme0n1p5 974360576 975409151 1048576 512M Microsoft basic data
/dev/nvme0n1p6 975409152 1016369151 40960000 19,5G Linux swap
/dev/nvme0n1p7 1016369152 1998360575 981991424 468,3G Linux filesystem
Partition table entries are not in disk order.
NOW MY QUESTION:
Timeshift automatically selects nvme0n1p5 as /boot/efi partition. However I would think that nvme0n1p1, labelled as EFI SYSTEM by fdisk should be selected as /boot/efi inltimeshift. Which one is correct?
I have no experience with EFI stuff, but i can recommend to use the Timeshift GUI and not the CLI mode for a restore. The GUI gives side by side a compare Window, which partitions it wants to overwrite… it should be pretty clear after that.
I hope you have a fresh snapshot and don’t restore a old snapshot… otherwise you could face even more issues.
If you have created a fresh snapshot right before you playing around with this pacnew files, then everything should be fine.
You have 2 options, restore your snapshot (recommend to use GUI) or just open dolphin and click on “modified” to list the last modified files first, at /etc/
You may can open Dolphin to get a overview and copy+paste manually the old unmerged files (Timeshift backup files), to get it working again.
This sounds to me like this file:
/etc/passwd
Check for recently modification and maybe replace it.
This pacnew file showed up in February this year.
Edit:
If im right and it is this file and you want still assist or need more infos to Merge this file.
Look at the comments in the annoucement Topic from February:
KNAME PTTYPE TYPE FSTYPE SIZE PARTTYPENAME PARTLABEL LABEL
sda gpt disk 931.5G
sda1 gpt part vfat 953M EFI System
sda2 gpt part btrfs 900G Linux filesystem
sda3 gpt part swap 28.1G Linux swap
sdb gpt disk 476.9G
sdb1 gpt part vfat 512M EFI System efi EFI
sdb2 gpt part 476.4G Linux filesystem manjaro
sdc gpt disk 4.5T
sdc1 gpt part exfat 1G Microsoft basic data efi
sdc2 gpt part 10G Linux filesystem OutOfSpace
sdc3 gpt part btrfs 2.9T Linux filesystem 1 1
sdc6 gpt part btrfs 1000G Linux filesystem 4 4
sdc7 gpt part btrfs 646.5G Linux filesystem 5 5
sr0 rom 1024M
nvme0n1 gpt disk 1.9T
nvme0n1p1 gpt part vfat 1G EFI System
nvme0n1p2 gpt part 1M BIOS boot grub2 core.img
nvme0n1p3 gpt part btrfs 900G Linux filesystem manjaro21
nvme0n1p4 gpt part btrfs 942.7G Linux filesystem backup
nvme0n1p5 gpt part swap 64G Linux swap swap swap2
Going by your description of how you got yourself in this situation,
you can likely get by without needing to timeshift.
There is a good chance to remedy the situation - but you probably need to boot from USB
to have access to the file system without needing the system to be up.
sudo mount /dev/sdXy /mnt
mount the / partition to /mnt
(or simply use your file manager - but then the PATH in the following commands is different)
sudo cp /mnt/etc/passwd /mnt/etc/passwd.backup
create a backup of your current passwd file
sudo cp /mnt/etc/passwd- /mnt/etc/passwd
copy the backup of the passwd file (denoted by the - at the end) over the one that you now have -
which is no longer working - because it is the default file (the .pacnew file) without any of your changes
If that was the source of your current problem, these three commands should get you back up and running - reboot and see …
If that wasn’t the source of the problem, then you haven’t made anything worse than it already was - you have the backup file and can revert.
He can also open Timeshift GUI from Live Boot and click on Browse, then Dolphin opens with root rights, from there he can easy copy+paste this file from his snapshot to his destination.
This as well - just pull the one file you need out of the timeshift backup.
I never used timeshift and couldn’t recommend it because I do not know it.
replacing the defunct /etc/passwd with it’s always present /etc/passwd- backup copy is a lightweight timeshift as well
Thank you! That was a very simple and effective idea!
I had indeed changed /etc/passwd, /etc/shadow and /etc/shells.
The root of my issue turned out to be the missing paths for zsh in /etc/shells. This meant that zsh was not recognized as a valid login shell (if I understand correctly).
My /etc/shells file looks now like this:
# Pathnames of valid login shells.
# See shells(5) for details.
/bin/sh
/bin/bash
/bin/rbash
/bin/zsh
/usr/bin/sh
/usr/bin/bash
/usr/bin/rbash
/usr/bin/zsh
/usr/bin/git-shell
/usr/bin/systemd-home-fallback-shell
I shall mark this post as the solution, however note that it is based on @Kobold’s 1st answer.
Further, thank you @anon33601770 for the details on how to recover the files in question: