From 70307c69f1f7be0f4791137e1e73e6e39a263ca7b8b754d7219a89bb34c87b4c Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 22 Nov 2013 10:17:20 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/shadow?expand=0&rev=13 --- shadow.changes | 7 +++++++ userdel-pre.local | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/shadow.changes b/shadow.changes index ed20759..dbe0bfe 100644 --- a/shadow.changes +++ b/shadow.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Nov 22 10:15:25 UTC 2013 - werner@suse.de + +- Stop any systemd user manager instance in case a user entry will + be deleted (bnc#849870). Nevertheless a running process requires + the option --force for the userdel command. + ------------------------------------------------------------------- Tue Nov 12 14:47:30 CET 2013 - kukuk@suse.de diff --git a/userdel-pre.local b/userdel-pre.local index 9924962..7fa5272 100644 --- a/userdel-pre.local +++ b/userdel-pre.local @@ -23,6 +23,10 @@ fi # Remove cron jobs test -x /usr/bin/crontab && /usr/bin/crontab -r -u $1 +# Stop systemd user jobs, even this requires --force +id=$(id -u $1) +systemctl stop user@${id}.service > /dev/null 2>&1 & + # All done. exit 0