Trying to repair/replace a system from a failed backup.
/etc is gone, trying to recover that, but in the meantime I need to work on a plan B.
/home remains with UID and GID and all of the important data (email). Approximately 300 users 600Gig containing dovecot/imap folders.
The problem is recreating the users:
Assuming worst case scenario, is there a way to mine the username, UID and GID from the /home directory and feed that into /etc/password /etc/group /etc/shadow files (setting the password to the username?)