diff --git a/sysuser-tools.changes b/sysuser-tools.changes index 6c154fe..902fecd 100644 --- a/sysuser-tools.changes +++ b/sysuser-tools.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jan 19 15:15:41 UTC 2021 - Thorsten Kukuk + +- If systemd-sysusers is used to create a new user/group, invalidate + the nscd passwd and group cache to make the new user/group + visible immediately as workaround [bsc#1181121]. + Needs to be removed after sytemd-sysusers get's fixed, since we + invalidate the cache even if the user/group file wasn't changed. + ------------------------------------------------------------------- Sun Jan 17 21:16:25 UTC 2021 - Thorsten Kukuk diff --git a/sysusers2shadow.sh b/sysusers2shadow.sh index 492e461..f8db958 100644 --- a/sysusers2shadow.sh +++ b/sysusers2shadow.sh @@ -11,7 +11,12 @@ if [ -x /usr/bin/systemd-sysusers ]; then # Use systemd-sysusers and let it read the input directly from stdin /usr/bin/systemd-sysusers - - + # We need to clear the nscd cache, as systemd-sysusers could have + # triggered a negative cache entry + if [ -x /usr/sbin/nscd ]; then + /usr/sbin/nscd -i passwd + /usr/sbin/nscd -i group + fi else # Absolute path to busybox, if found