From f28891636d2ae361d35fd7d7f0a7fc5f63732034 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 27 Jan 2010 18:04:40 -0800 Subject: Allow local user (non vbash) accounts Don't purge non-vyatta users. --- lib/Vyatta/Login/User.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/Vyatta/Login/User.pm') diff --git a/lib/Vyatta/Login/User.pm b/lib/Vyatta/Login/User.pm index 3038c467..cc28fd1e 100755 --- a/lib/Vyatta/Login/User.pm +++ b/lib/Vyatta/Login/User.pm @@ -176,8 +176,11 @@ sub _local_users { my @users; setpwent(); - while ( my ($name, undef, $uid) = getpwent() ) { + while ( my ($name, undef, $uid, undef, undef, undef, + undef, undef, $shell) = getpwent() ) { next unless ($uid >= 1000 && $uid <= 29999); + next unless $shell eq '/bin/vbash'; + push @users, $name; } endpwent(); -- cgit v1.2.3