pglistener(1)

πŸ“¦
version 5.2 Β· 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ pglistener(1) ✨

okay bestie, welcome to pglistener β€” the postgres listener πŸ’… (yep, that's the whole name, that's the vibe)


🌸 NAME 🌸

pglistener β€” postgres listener. that's it. that's the name. short, sweet, iconic πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

okay so pglistener is a daemon that generates files from a Postgres database. literally just vibes and file generation ✨

it's a tool that listens for notifies from a Postgres database and then calls out to a number of hooks, and those hooks do everything from updating the password database to updating accounts in RT. it's giving main character energy in your auth stack, fr fr 🫢


πŸŽ€ USAGE πŸŽ€

config and hooks live under these paths, no cap:

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

and here's the good news bestie β€” it is fine to restart postgres while pglistener is running. no drama πŸ’…

if pglistener crashes for whatever reason (it happens, we don't judge πŸ™ˆ), it can be restarted as a normal service.

and honestly? pglistener can in general be restarted at any time β€” it's quick to start and there are no interruptions to services or authentication. so lowkey the most chill daemon ever. obsessed πŸ₯°


πŸ¦‹ SETTING UP πŸ¦‹

step one bestie: install a usable pglistener config in /etc/pglistener/pglistener.conf, and it should be mode 600, user pglistener. lock it down, we love a secure queen πŸ”

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

and make sure pam_mkhomedir is set up β€” /etc/pam.d/common-session should contain:

session required pam_mkhomedir.so

that's the whole setup, you ate that πŸ’…βœ¨


πŸ’œ AUTHOR πŸ’œ

the pglistener was written by, in no particular order but all iconic:

  • Rob Bradford <rob@robster.org.uk>
  • Robert McQueen <robert.mcqueen@bluelinux.co.uk>
  • Dafydd Harries <dafydd.harries@collabora.co.uk>
  • Tollef Fog Heen <tfheen@err.no>
  • Maxime Buquet <pep@bouah.net>
  • Jordi Mallach <jordi@debian.org>
  • Vivek Das Mohapatra <vivek.dasmohapatra@collabora.com>
  • Paulo Henrique de Lima Santana <phls@debian.org>
  • Bruna Pinos de Oliveira <bruna.pinos@collabora.com>
  • Mark Kennedy <mark.kennedy@collabora.com>
  • Stelios Milidonis <stelios.milidonis@collabora.com>

for a complete list of authors, please open the AUTHORS file. it's giving credits scene at the end of a movie 🎬

this manual page was written by Paulo Henrique de Lima Santana (phls) <phls@debian.org> for the Debian project (but may be used by others). slay 🫢


okay that's the whole page bestie, thanks for reading, mwah πŸ’–

this is PGLISTENER 5.1, dated Apr 2024 β€” like and subscribe, see you in the next manpage πŸ‘‘βœ¨πŸŒˆ

πŸ“¦ where this page comes from