File: README

package info (click to toggle)
libnss-pgsql 1.4.0debian-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 1,452 kB
  • ctags: 385
  • sloc: sh: 7,907; ansic: 1,106; xml: 392; makefile: 42; sql: 38
file content (74 lines) | stat: -rw-r--r-- 2,696 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
0. What's it about?
-------------------------------------------------------------

This is a so called Name Service Switch (NSS) Module for use with glibc.
With it you can replace /etc/passwd, /etc/shadow, /etc/group etc. with
a PostgreSQL database. Note that you need another piece of software, a
plugin to the Pluggable Authentication Modules (PAM) that lets you
authenticate against this database. It is available from

  http://pgfoundry.org/projects/sysauth

1. Prerequisites
-------------------------------------------------------------

You will a current glibc (I tested on 2.3) and at least the PostgreSQL
client library (libpq, version 7.4 or higher) on your system to use this
module. Systems tested:

 - Gentoo GNU/Linux
   libpq MUST be compiled with thread-safety
 - Debian GNU/Linux 3.0 aka woody
   just 'apt-get install libnss-pgsql1' from unstable :)
 - Ubuntu 5.10 Breezy
   just 'apt-get install libnss-pgsql1' from universe

2. Installation
-------------------------------------------------------------

If you install from sources, follow these steps (general installation
instructions on how to use the configure script, make and such can be
found in the file INSTALL):

 - Find the place where files called libnss_*.so are installed on
   your system. In Debian this is /lib so I will use this.

 - Decide where to put the configuration file. It is called nss-pgsql.conf
   and I have it in /etc

 - Run configure. My setup looks like this (note the paths):

   ./configure --libdir=/lib --sysconfdir=/etc

 - If configure doesn't complain about anything, you can type
   'make' to compile the module

 - As root type 'make install' to install the module to whatever
   directory you gave as --libdir to configure.

 - Have a look at conf/nss-pgsql.conf, conf/nss-pgsql-root.conf
   and conf/dbschema.sql for a sample configuration.

3. Setup your System
-------------------------------------------------------------

To use this module on your system make sure your nss-pgsql.conf is
properly written. Then you can include the module in your
/etc/nsswitch.conf. Look at conf/nsswitch.conf for an example.
Don't forget to have a root console open before playing around
with NSS because you can lock yourself out of your computer!

To use shadow system, you must be create the table for shadow passwd.
Your nss-pgsql-root.conf is properly written, and you make it readable
only by root.
 # chmod 600 /etc/nss-pgsql-root.conf
 # chown root:root /etc/nss-pgsql-root.conf

4. Where to get more information
-------------------------------------------------------------

Consult the glibc documentation for more information on NSS.


2001-10-04, Joerg
2004-09-27, Russell Smith