In UNIX,shell is a very strong and most important tool.
When you login to UNIX , a shell executes and you see a login prompt, this shell can be a bourne shell , a POSIX shell, etc (depending on the versions of UNIX) i.e. for LINUX it is a bourne shell.
When a user types a username , a password prompty comes and when user types a password ,the entry is matched with the preentry made in file /etc/passwd .
Now if the entry matches the user successfully get loged in but if the password doesnt match the GETTY program takes over and we get a new login prompt untill you made a true entry.

Thats all for the unix shell scripts used while the user makes a login.For more such informations give a like to our facebook page and leave your valuable comments too.