summaryrefslogtreecommitdiff
path: root/debian/vyos-1x.postinst
diff options
context:
space:
mode:
authorIndrajit Raychaudhuri <irc@indrajit.com>2023-12-28 20:43:35 -0600
committerIndrajit Raychaudhuri <irc@indrajit.com>2023-12-29 12:57:13 -0600
commit3192095a197ae8d74690ab5c676e6a5fabae7fae (patch)
treed2bbff3174fc39d30b7749200557b5d3c38f6975 /debian/vyos-1x.postinst
parent745b9ea8f0df58ccd68215360b0375e89c0632a8 (diff)
downloadvyos-1x-3192095a197ae8d74690ab5c676e6a5fabae7fae.tar.gz
vyos-1x-3192095a197ae8d74690ab5c676e6a5fabae7fae.zip
dhcp: T3316: Add `_kea` user as vyattacfg group member
Allowing `_kea` to be a member of `vyattacfg` group allows kea-dhcp{4,6}-server to have access to DHCP lease directory under `/config/` and thus have ability to manipupate the leases files.
Diffstat (limited to 'debian/vyos-1x.postinst')
-rw-r--r--debian/vyos-1x.postinst8
1 files changed, 4 insertions, 4 deletions
diff --git a/debian/vyos-1x.postinst b/debian/vyos-1x.postinst
index cd88cf60c..bbbc00f03 100644
--- a/debian/vyos-1x.postinst
+++ b/debian/vyos-1x.postinst
@@ -109,10 +109,10 @@ 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
+# Add _kea user for kea-dhcp{4,6}-server to vyattacfg
+# The user should exist via kea-common installed as transitive dependency
+if grep -q '^_kea' /etc/passwd; then
+ adduser --quiet _kea vyattacfg
fi
# ensure the proxy user has a proper shell