summaryrefslogtreecommitdiffstats
path: root/debian/freeradius-common.postinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:49:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:49:47 +0000
commitb486f33989b6fa5fd31509219f0c1e55a2dc7db3 (patch)
tree62b4ab75fb48b8aa9472b4ceee53943d2443ffb2 /debian/freeradius-common.postinst
parentAdding upstream version 3.2.1+dfsg. (diff)
downloadfreeradius-b486f33989b6fa5fd31509219f0c1e55a2dc7db3.tar.xz
freeradius-b486f33989b6fa5fd31509219f0c1e55a2dc7db3.zip
Adding debian version 3.2.1+dfsg-4+deb12u1.debian/3.2.1+dfsg-4+deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/freeradius-common.postinst')
-rw-r--r--debian/freeradius-common.postinst22
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/freeradius-common.postinst b/debian/freeradius-common.postinst
new file mode 100644
index 0000000..df3e9db
--- /dev/null
+++ b/debian/freeradius-common.postinst
@@ -0,0 +1,22 @@
+#!/bin/sh
+# vim:ts=2:sw=2:et
+
+set -e
+
+case "$1" in
+ configure)
+ if [ -z "$2" ]; then
+ # On a fresh install, add the necessary user and group
+ adduser --quiet --system --no-create-home --home /etc/freeradius --group --disabled-password freerad || true
+
+ # Put user freerad in group shadow, so the daemon can auth locally
+ # Only do this on fresh install as the admin may not want freerad in shadow
+ # group if authenticating by another mechanism
+ adduser --quiet freerad shadow
+ fi
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0