Next Previous Contents

## 1. Introduction

This is a document describing the libpwdb functions (or how they will function). Cristian and Andrew will be modifying this file as we go along. Hopefully it will describe the library when it is finished.

## 1.1 Motivation

Linux, at the level of the kernel, identifies a user by a 16-bit integer--their UID. At the level of a functioning system, the user has other characteristics; a name, group memberships, a home, a number of aliases (email address etc.) and a password.

The mapping of a UID to each of these pieces of personal data is with respect to a database file. Unfortunately, depending on circumstances there is no single location for this database. The most basic Linux system might have a single `/etc/passwd` file, with a single entry for each user, and an `/etc/group` file containing a list of the groups defined on the local system. In shadow aware systems a user might additionally have an `/etc/shadow` entry. In a networked environment, all of the users might be identified by entries in a file located on a remote computer.

While it is possible for a local system to adopt one scheme to satisfy the demands of the POSIX `getpw..` commands, it is problematic for an individual system to simultaneously support a variety of databases to define its users and groups.

It is desirable for applications to be able to obtain user-information in a transparent manner. At the same time certain applications might like to obtain information from a specific database for a given user - these applications might perform the task of maintaining and updating databases for example. The functions of libc, do not currently offer this flexibility. It is for this reason that libpwdb has been created. It is intended to provide a flexible and yet simple database management primarily for user and group information under Linux systems. An API that all applications can use.

Should this library become popular, it is anticipated that the database will be extended to include other types of database files.

Next Previous Contents