Originally Posted by niharikaananth
Could you please give any url link which shows "one-to-one mapping between username and uid"
The mapping is in the /etc/passwd file. The system calls don't look at the username. The kernel uses the UID of the process and checks the permissions to determine whether you have access.
The username is also listed in the /etc/shadow file. The shadow file maps the username to the hash of the users password. The passwd file is world readable, so the hash was moved to the shadow file to prevent password cracking.
You can use the command "getent passwd <username>" or "getent passwd <#UID>" or the `id' command to get your user id. You can also read the passwd file yourself.
The passwd file even has its own man page: `man 5 passwd'.