Chose "overwrite" old files with .pacnew - now can't login

At least now you know it better. Secondly, use timeshift, then you can easily restore your system. I would backup valuable files and reinstall.

…But yes, you did. You manually overwrote them with the pacnews.
The default way the package manager works is by not overwriting files that have changes particular to the system. Thats why a pacnew was created. You then commanded that your files be overwritten by the pacnew files.

1 Like

If you lucky to have livecd with linux (I would say any linux distro) then you can load that livecd, chroot and at first observe the logs to find out what exactly files were changed.

Just for elaborate. Have you tried to log in with root for example?

Quite some people do not take system maintenance seriously and accumulate several pacnew files from several different updates.
If OP is unlucky, /etc/shadow (or rather /etc/shadow.pacnew) was amongst the list.


Let me rephrase that: I didn’t do so before overwriting them, so I assumed from the description in the update announcement (and the linked wiki entry) that unless you do so before, you can overwrite them.

Well, it was the first time I heard about that potential issue (I’ve been using Manjaro for some time now) or the necessity of system maintenance beyond making sure updates are running through without any errors.

root login doesn’t seem to work either.

only live cd can shed light in your case and help also

chroot you are our only hope:

I think this is exactly that, I remember that pacnew file was recently created and when looking at it I told myself “nope don’t destroy your accounts, delete this pacnew file” :smiley: it had ‘empty’ accounts infos in the pacnew.

edit: here [Stable Update] 2020-06-13 - Kernels, Systemd, Pamac, Cinnamon, Deepin, Firefox, Thunderbird, Qt, Kodi - Stable Updates - Manjaro Linux Forum not so old update

Well, then that is probably what has happened.
Guess I’ll read into how to repair the accounts/passwords. Otherwise I’ll just reinstall, since that will not take that long either and everything after can be running in the background.

Now I’m not specifically blaming anyone here (and I’m not upset about the whole thing) but maybe this whole *.pacnew issue could have been communicated better.
The update announcement made it sound as if replacing is usually the way to go - and anyway it seems rather difficult for non-expert users to determine when to do what.

Why is that happening at all anyway? I’ve never encountered anything similar with other distros (like the Debian based ones).

Also, thank you all for the suggestions so far!

Did you do your system updates via terminal or did you use pamac (gui)?
I do not know if pamac (gui) alerts you to pacnew files, but pacman (terminal) certainly does.
Apparently there is a feature request open for pamac to better alert to pacnew files:

Sometimes new features are added to programs, and new parameters need to be added to the program config file, so in order to not overwrite the user’s config file with the new one, it decides to install the new default config file as .pacnew so the user can check the difference between his config file and the new default one. Most of the time the user just needs to add a few new lines in his old config file, but some other time, like for your accounts config file, this is important to keep it and just add manually the new parameters if needed.
Yes usually you could replace your config files with .pacnew because it is not an issue to reset some configuration to default in most cases, but at the end of the day the user needs to have a look by himself and think about it before doing anything, like for instance the shadow config file containing your accounts info.

1 Like

You get this in certain rolling distros. It’s not just the Arch-based family, but when I update my Sabayon install (Gentoo-based), I’m also told about changes to conf files that I should check on.

Remember fixed release distros like Debian or Fedora have a fixed life, after which you have to install the new version whether as a fresh install or via upgrade path. Doing so cleans up the whole root partition including all the relevant changes to conf files, because new packages and conf files are installed afresh. But for rolling, you have to do your own maintenance and cleanup once in a while because you’re going to be using the same old root partition indefinitely.

I used pacman in terminal.
Of course I didn’t pay much attention there either (also because it kept spamming a warning apparently due to some outdated mirror), since 99% the updates went without any major issues for me so far.
This time it was that 1%, apparently.

if we not use Timeshift :roll_eyes:
is possible to save all config file for .pacnew in archive (any file that can generate a .pacnew file) before merge .pacnew

tar -czf "mybackupSystemConfig.tar.gz" $(LANG=C pacman -Qii|awk '/^MODIFIED/ {print $2}')

LANG=C pacman -Qii|awk '/^MODIFIED/ {print $2}' display all “.pacnew future” , these files are different from the original package

Use a live iso and open a terminal

sudo manjaro-chroot -a

Then check if you have these files

# /etc/shadow-
# /etc/passwd-

These are backups - list their content - they should contain your username

# cat /etc/passwd-
# cat /etc/shadow-

If they contain your username copy them to their original

# cp /etc/shadow- /etc/shadow
# cp /etc/passwd- /etc/passwd

Edit: 2020-09-01T05:40:00Z

Another candidate for verification is

  • /etc/group

Question at @linux-aarhus for repair if no backup exists:
not possible to copy this files from iso to my manjaro, change home in passwd file, boot my manjaro as “manjaro” user and after change user name ?

problem: no exists in this iso file some users “application” (lightdm, sddm, http, …) re-install this apps

1 Like

Thank you @linux-aarhus and @papajoke, I’ll have a look at it in the evening (assuming I find time).

I remember reading something about this

Thank you very much, your suggestion worked, I managed to log in again.
Let’s see if anything else got borked, but for now all looks well.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.