summaryrefslogtreecommitdiff
path: root/debian/vyos-1x.postinst
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-20 20:18:06 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-20 20:18:06 +0100
commit3568e45dca8ad810abd0ea6ddda686e98bbb80b1 (patch)
tree5066ba985c6c4ddbc5ae6128745846b4a61b18c9 /debian/vyos-1x.postinst
parent12a6cca544f985e86b9d7c9626cc35622fcfb95b (diff)
downloadvyos-1x-3568e45dca8ad810abd0ea6ddda686e98bbb80b1.tar.gz
vyos-1x-3568e45dca8ad810abd0ea6ddda686e98bbb80b1.zip
Debian: add radius_user and radius_priv_user via postinstall
Diffstat (limited to 'debian/vyos-1x.postinst')
-rw-r--r--debian/vyos-1x.postinst23
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/vyos-1x.postinst b/debian/vyos-1x.postinst
index 92948de12..0597fbc66 100644
--- a/debian/vyos-1x.postinst
+++ b/debian/vyos-1x.postinst
@@ -20,6 +20,29 @@ if ! grep -q '^minion' /etc/passwd; then
adduser --quiet minion users
fi
+# Add RADIUS operator user for RADIUS authenticated users to map to
+if ! grep -q '^radius_user' /etc/passwd; then
+ adduser --quiet --firstuid 1001 --disabled-login --ingroup users --gecos "radius user" --shell /bin/vbash radius_user
+ adduser --quiet radius_user frrvty
+ adduser --quiet radius_user vyattaop
+ adduser --quiet radius_user operator
+ adduser --quiet radius_user adm
+ adduser --quiet radius_user dip
+ adduser --quiet radius_user users
+fi
+
+# Add RADIUS admin user for RADIUS authenticated users to map to
+if ! grep -q '^radius_priv_user' /etc/passwd; then
+ adduser --quiet --firstuid 1001 --disabled-login --ingroup vyattacfg --gecos "radius privileged user" --shell /bin/vbash radius_priv_user
+ adduser --quiet radius_priv_user frrvty
+ adduser --quiet radius_priv_user vyattacfg
+ adduser --quiet radius_priv_user sudo
+ adduser --quiet radius_priv_user adm
+ adduser --quiet radius_priv_user dip
+ adduser --quiet radius_priv_user disk
+ adduser --quiet radius_priv_user users
+fi
+
# add hostsd group for vyos-hostsd
if ! grep -q '^hostsd' /etc/group; then
addgroup --quiet --system hostsd