pglistener(1)

pglistener1

Postgres listener.

Overview

pglistener is a daemon that generates files from Postgres database.

It is a tool that listens for notifies from a Postgres database and then calls out to a number of hooks which do everything from updating the password database to updating accounts in RT.

Usage

Config and hooks live under:

    /var/lib/pglistener
    /var/lib/pglistener/hooks
    /etc/pglistener
    /etc/pglistener/conf.d

It is fine to restart postgres while pglistener is running.

If pglistener crashes for whatever reason, it can be restarted as a normal service.

Pglistener can in general be restarted at any time, it's quick to start and there are no interruptions to services or authentication.

Setting up

Install a usable pglistener config in /etc/pglistener/pglistener.conf and should be mode 600, user pglistener.

Make symlinks for databases in /var/lib/misc:

    cd /var/lib/misc
    ln -s ../pglistener/group.db
    ln -s ../pglistener/passwd.db
    ln -s ../pglistener/shadow.db

If you have ssh keys for everybody on the host, add the following two lines to /etc/ssh/sshd_config:

    AuthorizedKeysFile /root/%u/.ssh/authorized_keys
    AuthorizedKeysFile2 /var/lib/misc/sshkeys/%u

Make sure pam_mkhomedir is set up, /etc/pam.d/common-session should contain:

    session required pam_mkhomedir.so

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13