<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.20"> <TITLE>The PWDB Library Guide: Configuration</TITLE> <LINK HREF="pwdb-3.html" REL=next> <LINK HREF="pwdb-1.html" REL=previous> <LINK HREF="pwdb.html#toc2" REL=contents> </HEAD> <BODY> <A HREF="pwdb-3.html">Next</A> <A HREF="pwdb-1.html">Previous</A> <A HREF="pwdb.html#toc2">Contents</A> <HR> <H2><A NAME="s2">2.</A> <A HREF="pwdb.html#toc2">Configuration</A></H2> <H2><A NAME="ss2.1">2.1</A> <A HREF="pwdb.html#toc2.1">The configuration file</A> </H2> <P>Use of <CODE>libpwdb</CODE> requires the presence of a correctly formatted configuration file: <CODE>/etc/pwdb.conf</CODE>. It has the following syntax:</P> <P> <BLOCKQUOTE><CODE> <PRE> # # first the list of user databases # user: list1 list2 list3 ... # # next, the list of group databases # group: list1 list2 ... # # end of file # </PRE> </CODE></BLOCKQUOTE> </P> <P>Here, <CODE>listN</CODE> has the following form <CODE>name1+name2+name3</CODE>. It indicates a collection of databases that are merged to form the record for the user/group. When selecting the default database (PWDB_DEFAULT) the library chooses the list whose first <CODE>name</CODE>d database contains an entry for the requested <CODE>user</CODE> (<CODE>id</CODE>). Currently, the <CODE>nameN</CODE> items are from the following selection: <CODE>nis</CODE>, <CODE>unix</CODE>, <CODE>radius</CODE> and <CODE>shadow</CODE>.</P> <P>Newlines are ignored except where they terminate comments; comments are preceded with `<CODE>#</CODE>' characters.</P> <P>A simple example <CODE>/etc/pwdb.conf</CODE> file would be: <BLOCKQUOTE><CODE> <PRE> # This is an example /etc/pwdb.conf file. It defines the # database information sources for users in this system # First, we define where user information is stored # (here, users are listed in /etc/passwd and may have # supplementary information in the /etc/shadow file) # Should the user have a shadow entry the combination is # used user: shadow + unix unix # Second, we define where the users' groups are listed # (here the groups are listed in the /etc/group file # in addition, there is group information to be found # in the /etc/sgroup file) group: unix + shadow # # end of file </PRE> </CODE></BLOCKQUOTE> </P> <HR> <A HREF="pwdb-3.html">Next</A> <A HREF="pwdb-1.html">Previous</A> <A HREF="pwdb.html#toc2">Contents</A> </BODY> </HTML>