Recently I fixed a problem caused by duplicate entries in /etc/passwd
on Linux. To catch it sooner next time I plan to do some basic sanity checks on the file each day, one of which will be that no duplicate uids are found.
But surely this is something many others have done and there is already a well-known tool to lint the passwd
and group
files for errors? I appreciate it is only a couple of lines of perl, but before reinventing the wheel I feel I should check. Does such a program exist?
/etc/passwd
entry withvipw
on Ubuntu and CentOS.