You are not logged in.
When I was moving through systems I updated users and groups by doing appending cat from every source group, shadow, gshadow to it's destiny ones, which unnicely created some duplicated users and groups and little other inconsistencies.
As you would expect this prevented shadow.service for being able to start, so I want to know which is the extent of the consequences from this?
For what I know it should go from little security issue, to mayor security break to total chaos; so I want to know how urgent would be to solve this particular issue, thanks.
Edit: @loqs, that command line is overwrite, and I appended so replace the '>' for '>>' and then it was exactly like that. I wouldn't have duplicated entries if I did simply '>'
I wanted to achieve simply what the command line does, transfer users, groups, and passwords from one system to another as a more straight forward method than installing the desktop home migration service, but I forgot to purge the files.
@Jasonwryan thank for teaching me how to use systemctl but that description it's the same that i read from
systemctl status shadowand it's not very descriptive.
In what manner shadow checks integrity? what action does it takes after detecting a corruption? qwhat other services are expecting output/events from it?, etc.
Last edited by Automath (2021-09-28 04:44:14)
Offline
When I was moving through systems I updated users and groups by doing appending cat from every source group, shadow, gshadow to it's destiny ones, which unnicely created some duplicated users and groups and little other inconsistencies.
Please detail precisely what you did. Was it really:
# cat /mnt/etc/passwd > /etc/passwd
# cat /mnt/etc/shadow > /etc/passwd
# cat /mnt/etc/group > /etc/group
# cat /mnt/etc/gshadow > /etc/groupWhat were you trying to achieve by adding entries from the old system?
Offline
┌─[Shiv ~]
└─╼ systemctl cat shadow.service
# /usr/lib/systemd/system/shadow.service
[Unit]
Description=Verify integrity of password and group filesOffline
cat /usr/lib/systemd/system/shadow.service[Unit]
Description=Verify integrity of password and group files
After=systemd-sysusers.service
[Service]
Type=simple
# Always run both checks, but fail the service if either fails
ExecStart=/bin/sh -c '/usr/bin/pwck -r || r=1; /usr/bin/grpck -r && exit $r'
Nice=19
IOSchedulingClass=best-effort
IOSchedulingPriority=7https://man.archlinux.org/man/core/shadow/pwck.8.en
https://man.archlinux.org/man/core/shadow/grpck.8.en
Offline