You are not logged in.

#1 2021-09-24 15:46:40

ThinkPad
Member
Registered: 2019-01-29
Posts: 125

What package makes files ending in `-` (e.g. /etc/shadow-)

Backstory:
I really goofed and F'd my system by merging a very old shadow.pacnew that effectively reset my shadow file, resulting in me getting locked out of my system.

This post, especially eschwartz helped me tremendously to understand my wrongdoing. What really saved me though was mention of /etc/shadow-.

Who creates these files?

I use pacfiles-mode to resolve these conflicts.

Revelations:
https://bbs.archlinux.org/viewtopic.php … 1#p1821111
https://bbs.archlinux.org/viewtopic.php … 6#p1904656

Solution for posterity:
I sideloaded my filesystem from a live usb:

# mount /your/fs/partition/or/vg /mnt/os

and copied the backup `-` file onto the original:

# cp /mnt/os/etc/shadow- /mnt/os/etc/shadow

Offline

#2 2021-09-24 16:51:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: What package makes files ending in `-` (e.g. /etc/shadow-)

Your question strikes me as oddly worded.  The /etc/shadow file is owned by the core/filesystem package, but /etc/shadow- is not own by any package.  It is also not created by any package, but it can be created or modified by a range of binaries.  The binaries typically used that can create / modify this file all belong to the package core/shadow.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2021-09-25 05:56:59

Awebb
Member
Registered: 2010-05-06
Posts: 6,286

Re: What package makes files ending in `-` (e.g. /etc/shadow-)

I googled for "/etc/shadow- dash" and the first result told me to look up man 5 shadow and man 5 passwd. Short answer: Those are backups.

Offline

#4 2021-09-28 19:21:28

ThinkPad
Member
Registered: 2019-01-29
Posts: 125

Re: What package makes files ending in `-` (e.g. /etc/shadow-)

Thank you @Awebb. Yes I understand it is a backup, but created by who?

Offline

#5 2021-09-28 19:23:41

ThinkPad
Member
Registered: 2019-01-29
Posts: 125

Re: What package makes files ending in `-` (e.g. /etc/shadow-)

Trilby wrote:

Your question strikes me as oddly worded.

Yes I see that now. What might've helped was specifying "Who creates these backup files" and "...resolve pacnew conflicts".

Offline

#6 2021-09-28 19:40:32

seth
Member
Registered: 2012-09-03
Posts: 51,034

Re: What package makes files ending in `-` (e.g. /etc/shadow-)

ThinkPad wrote:

Thank you @Awebb. Yes I understand it is a backup, but created by who?

https://man.archlinux.org/man/shadow.5.en
/etc/shadow-

Backup file for /etc/shadow.
Note that this file is used by the tools of the shadow toolsuite, but not by all user and password management tools.

Last edited by seth (2021-10-12 22:08:01)

Online

#7 2021-10-12 22:05:47

ThinkPad
Member
Registered: 2019-01-29
Posts: 125

Re: What package makes files ending in `-` (e.g. /etc/shadow-)

Seth, I'm getting a 404 error.

Offline

#8 2021-10-12 22:08:52

seth
Member
Registered: 2012-09-03
Posts: 51,034

Re: What package makes files ending in `-` (e.g. /etc/shadow-)

Copy and püaste ate it … fixed now.

Online

#9 2021-10-13 07:53:54

Awebb
Member
Registered: 2010-05-06
Posts: 6,286

Re: What package makes files ending in `-` (e.g. /etc/shadow-)

As I said, man 5 shadow and man 5 passwd. Are you familiar with man pages? If not, look up "man page" in our local wiki.

Offline

Board footer

Powered by FluxBB