When you log into your UNIX system, you provide a username and a password at the login prompt. The login(1) program looks up that username in a database and obtains your registered password. It encrypts the password you supply at login and compares it to the one that is registered. If they are equal, the login(1) program lets you pass in peace.
Once you are logged in, however, you become just a number to the UNIX kernel. This user ID number simplifies user and security management for the kernel. In addition to logging in with a user ID, you log in with a group ID.
In this chapter, you will learn about the following:
User ID functions getuid(2) and geteuid(2)
Group ID functions getgid(2) and getegid(2)
How to change your effective user ID and group ID
The /etc/password file and its support functions
The /etc/group file and its support functions
Supplementary groups and their functions
3.145.186.83