The PWDB Library Guide: Configuration

Next Previous Contents

## 2. Configuration

## 2.1 The configuration file

Use of `libpwdb` requires the presence of a correctly formatted configuration file: `/etc/pwdb.conf`. It has the following syntax:

> `

>         #
>         # first the list of user databases
>         #
>             user:
>                     list1
>                     list2
>                     list3
>                     ...
>         #
>         # next, the list of group databases
>         #
>             group:
>                     list1
>                     list2
>                     ...
>         #
>         # end of file
>         #

> `

Here, `listN` has the following form `name1+name2+name3`. 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 `name`d database contains an entry for the requested `user` (`id`). Currently, the `nameN` items are from the following selection: `nis`, `unix`, `radius` and `shadow`.

Newlines are ignored except where they terminate comments; comments are preceded with ``#`' characters.

A simple example `/etc/pwdb.conf` file would be:

> `

>         # 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

> `

Next Previous Contents