summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-11-12 16:44:32 +0100
committerDaniil Baturin <daniil@baturin.org>2018-11-12 16:44:32 +0100
commit299cb670e76bcb364c410e5df69ddd95c4cb12be (patch)
tree429a19575d3e56ff0913eb7932adeeea5d1a5079
parent018860f21eb4151df5e0b719ad9b66331786ac4e (diff)
downloadvyatta-cfg-system-299cb670e76bcb364c410e5df69ddd95c4cb12be.tar.gz
vyatta-cfg-system-299cb670e76bcb364c410e5df69ddd95c4cb12be.zip
T740: force deletion of user home dir when deleting the user.
stderr is silenced to prevent useless error messages about the mail dir not being found.
-rwxr-xr-xlib/Vyatta/Login/User.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Vyatta/Login/User.pm b/lib/Vyatta/Login/User.pm
index 02fb96ee..c8b53e0a 100755
--- a/lib/Vyatta/Login/User.pm
+++ b/lib/Vyatta/Login/User.pm
@@ -118,7 +118,7 @@ sub _delete_user {
}
system("pkill -9 -u $user");
- system("userdel $user") == 0
+ system("userdel -r $user 2>/dev/null") == 0
or die "userdel of $user failed: $?\n";
}
}