WARNING: You can do serious damage to your system if you do not know
what you are doing! If you are trying changes in the Name Service Switch for
the very first time, consider doing that in a chroot environment or a test
machine. Have at least an editor with /etc/nsswitch.conf
open to
revert your changes easily. You have been warned!
Setting up the Name Service Switch is fairly easy, given a working installation
of the libnss-pgsql module. Just add an entry pgsql the
passwd and group lines of
/etc/nsswitch.conf
. You can tune the behaviour with options
between the entries to get a fully working system. Useful lines in
/etc/nsswitch.conf
would look like these:
passwd: compat [SUCCESS=continue] pgsql group: compat [SUCCESS=continue] pgsql
This will make your libc look into the standard passwd
and
group
files first, then lookup names via NIS (that is integrated
in the libnss-compat modules) and then use libnss-pgsql. The option
[SUCCESS=continue] ensures that all accounts or groups are
retrieved when using the iteration functions getpwent(3)
and
getgrent(3)
.
jorgland@sol.wohnheim.uni-ulm.de
mogul@gelatinous.com