The user has to exist in the /etc/passwd file.

Check out this and this for more information.

Note: Since passwords are encrypted in these files, if you see something simple like "*" or "!", then this means that that user/group cannot use it. This is because the encrypted password will never equal to "*" or "!".