User list is taken from `getent passwd` output instead of /etc/passwd

This will allow script to work when non-local accounts, taken from LDAP or winbind, are present on a computer.