next up previous
Next: User categories Up: The Unix Security Model Previous: Introduction

Users and groups

The Unix security model is quite simple. Every file in the filesystem, and every running process, is identified as belonging to a specific user and a specific group. For convenience, users and groups are identified by names, but internally they are represented by integers called the user id and group id respectively.

The users of a system are defined in the file /etc/passwd. Each line of this file contains the name of a user, the user's encrypted password (or an x if the encrypted password is stored elsewhere), the user id number and group id number, and other information such as the user's real name and home directory.

The groups of a system are defined in the file /etc/group. Each line of this file contains the name of a group, the group id number, and optionally a list of users belonging to the group. A user can belong to more than one group. The user's primary group is the one specified in /etc/password, and any other groups the user belongs to are specified by listing the user in /etc/group.



Robert Moniot
2000-09-13