diff --git a/platform/debian/systemd/kanidm-unixd.service b/platform/debian/systemd/kanidm-unixd.service index 0004e0015..19d3d469f 100644 --- a/platform/debian/systemd/kanidm-unixd.service +++ b/platform/debian/systemd/kanidm-unixd.service @@ -3,9 +3,12 @@ [Unit] Description=Kanidm Local Client Resolver -After=chronyd.service ntpd.service network-online.target -Before=systemd-user-sessions.service nss-user-lookup.target +After=chronyd.service nscd.service ntpd.service network-online.target +Before=systemd-user-sessions.service sshd.service nss-user-lookup.target Wants=nss-user-lookup.target +# While it seems confusing, we need to be after nscd.service so that the +# Conflicts will triger and then automatically stop it. +Conflicts=nscd.service [Service] DynamicUser=yes diff --git a/platform/opensuse/kanidm-unixd.service b/platform/opensuse/kanidm-unixd.service index de3aa7f17..f817189af 100644 --- a/platform/opensuse/kanidm-unixd.service +++ b/platform/opensuse/kanidm-unixd.service @@ -3,9 +3,12 @@ [Unit] Description=Kanidm Local Client Resolver -After=chronyd.service ntpd.service network-online.target -Before=systemd-user-sessions.service nss-user-lookup.target +After=chronyd.service nscd.service ntpd.service network-online.target +Before=systemd-user-sessions.service sshd.service nss-user-lookup.target Wants=nss-user-lookup.target +# While it seems confusing, we need to be after nscd.service so that the +# Conflicts will triger and then automatically stop it. +Conflicts=nscd.service [Service] DynamicUser=yes