Merged sillie's changes.

Now uses getent instead of /etc/passwd directl...y.

This should now take into account all user accounts and not just local.

Thanks, @sillie !