summaryrefslogtreecommitdiffstats
path: root/debian/freeradius-common.postinst
diff options
context:
space:
mode:
Diffstat (limited to '')
-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