summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-06-11 08:10:35 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-06-11 22:10:47 +0200
commit3bc07c4fc8bdc865a767aa927bfe9487710ee4d4 (patch)
tree2abed369c85bb2de140c5e65317ae390658e3fc9 /debian
parent96ed330e9691f9db79c837505802ae5055f86348 (diff)
downloadvyos-1x-3bc07c4fc8bdc865a767aa927bfe9487710ee4d4.tar.gz
vyos-1x-3bc07c4fc8bdc865a767aa927bfe9487710ee4d4.zip
dhcp(v6)-server: T2583: run as 'dhcpd' user
Add a 'dhcpd' system user that is a member of hostsd group and can connect to vyos-hostsd. Run dhcpd as this user.
Diffstat (limited to 'debian')
-rw-r--r--debian/vyos-1x.postinst6
1 files changed, 6 insertions, 0 deletions
diff --git a/debian/vyos-1x.postinst b/debian/vyos-1x.postinst
index 672f90dff..dc129cb54 100644
--- a/debian/vyos-1x.postinst
+++ b/debian/vyos-1x.postinst
@@ -24,3 +24,9 @@ fi
if ! grep -q '^hostsd' /etc/group; then
addgroup --quiet --system hostsd
fi
+
+# add dhcpd user for dhcp-server
+if ! grep -q '^dhcpd' /etc/passwd; then
+ adduser --quiet --system --disabled-login --no-create-home --home /run/dhcp-server dhcpd
+ adduser --quiet dhcpd hostsd
+fi