summaryrefslogtreecommitdiff
path: root/lib/Vyatta
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Vyatta')
-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 fa0cca7d..411aed6c 100755
--- a/lib/Vyatta/Login/User.pm
+++ b/lib/Vyatta/Login/User.pm
@@ -111,7 +111,7 @@ sub _delete_user {
or die "usermod of root failed: $?\n";
} elsif ( defined($login) && $login eq $user ) {
die "Attempting to delete current user: $user\n";
- } else {
+ } elsif ( getpwnam($user) ) {
if (`who | grep "^$user"` ne '') {
warn "$user is logged in, forcing logout\n";
system("pkill -HUP -u $user");