Hi everyone, I made an oopsie and merged over a few important files and I am trying to manually fix it. I have checked to see if there was a backup file of these couple files, but I cannot find any. The files I wrote over with the pacnew files were:
/etc/hosts
/etc/passwd
/etc/shells
/etc/fwupd/remotes.d/lvfs-testing.conf
/etc/fwupd/remotes.d/lvfs.conf
I am unable to login as my user, when I do the login screen refreshes and I am prompted to repeat the login process. I am able to login to root, but I am unable to identify what I need to change in /etc/shells or /etc/passwd to potentially add back my user.
Yes! That fixed my login issues. Thank you so much! I have tried replacing the backup files a couple times but didn’t try passwd, I was hyper focusing on /etc/shells.
Please note that to merge does not mean to overwrite. You merge.pacnew files by way of a tool like meld, diffuse or kompare.
For /etc/passwd, as root, just restore the automatically created backup file…
cp /etc/passwd- /etc/passwd
For /etc/shells, this is what it should look like…
# 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
Your /etc/hosts should look something like this…
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 localhost
# 127.0.1.1 the-name-of-your-computer | uncomment this is you have this filled in
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
This is great! I am a bit new to Arch, so learning pamac is something I am grappling with. I was using pacdiff to go through each file and yes I meant overwrite, not merge. Thank you for your time!
Well, pamac is a Manjaro thing. The Arch-proper package manager is pacman, which is command-line-only.
As an alternative to pamac — specifically, if you want a graphical package manager — there is also octopi, which generally works better than pamac, although it does not offer support for FlatPaks and Snaps, if you happen to be using those.
For merging your .pacnew files, there are several approaches.
Manjaro has a tool for that — with the disclaimer that it’s still under development and may not be perfect — called manjaro-pacnew-checker. It’s in the repositories…
sudo pacman -S manjaro-pacnew-checker
There is a similar tool in the AUR, called pacnew-chaser.
pamac build pacnew-chaser
In a terminal window, you can issue the following command…
DIFFPROG=meld pacdiff -s
… which will bring up meld — a graphical side-by-side editor — as the merging tool.