<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9"> <TITLE>The PWDB Library Guide: Introduction</TITLE> <LINK HREF="pwdb-2.html" REL=next> <LINK HREF="pwdb.html#toc1" REL=contents> </HEAD> <BODY> <A HREF="pwdb-2.html">Next</A> Previous <A HREF="pwdb.html#toc1">Contents</A> <HR> <H2><A NAME="s1">1. Introduction</A></H2> <P>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. <P> <H2><A NAME="ss1.1">1.1 Motivation</A> </H2> <P>Linux, at the level of the kernel, identifies a user by a 16-bit integer--their <EM>UID</EM>. 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. <P> <P>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 <CODE>/etc/passwd</CODE> file, with a single entry for each user, and an <CODE>/etc/group</CODE> file containing a list of the groups defined on the local system. In shadow aware systems a user might additionally have an <CODE>/etc/shadow</CODE> entry. In a networked environment, all of the users might be identified by entries in a file located on a remote computer. <P> <P>While it is possible for a local system to adopt one scheme to satisfy the demands of the POSIX <CODE>getpw..</CODE> commands, it is problematic for an individual system to simultaneously support a variety of databases to define its users and groups. <P> <P>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 <EM>libpwdb</EM> 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. <P> <P>Should this library become popular, it is anticipated that the database will be extended to include other types of database files. <P> <HR> <A HREF="pwdb-2.html">Next</A> Previous <A HREF="pwdb.html#toc1">Contents</A> </BODY> </HTML>