diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2012-08-17 13:07:55 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@vyatta.com> | 2012-08-17 13:07:55 -0700 |
commit | 8d5f6cdd84b95644502eb7115dbca03754549b74 (patch) | |
tree | 502f4083a2dd5e8d9a11f7ce183d8d689ebaaf3f /lib/Vyatta/Login | |
parent | 8b9f94b547553a2e440b7070c55617050edc2108 (diff) | |
download | vyatta-cfg-system-8d5f6cdd84b95644502eb7115dbca03754549b74.tar.gz vyatta-cfg-system-8d5f6cdd84b95644502eb7115dbca03754549b74.zip |
Allow deleting unknown user
Bug 8287
If user doesn't exist in passwd file that is fine.
Diffstat (limited to 'lib/Vyatta/Login')
-rwxr-xr-x | lib/Vyatta/Login/User.pm | 2 |
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"); |