I would like assistance with something I have to do.
I need to verify if all users in passwd are also in shadow, if the primary group exists, if the homedir exists and if it belongs to the correct user/group. If something is wrong, it should output it to a new file, called for example "errors".
How can I implement a script that does this?