diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-02-02 08:36:20 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-02-02 08:36:20 -0800 |
commit | 831abebf172d4350849aecca838547f8878f36d1 (patch) | |
tree | 92915b97004b6ec1a656a3ab7d60894840d064f7 /lib | |
parent | 9d7c1541cf1a276b11c484e92edee23fbefe1ced (diff) | |
parent | d8775dbac40e0f1a3ebadb41097b70d785a15013 (diff) | |
download | vyatta-cfg-system-831abebf172d4350849aecca838547f8878f36d1.tar.gz vyatta-cfg-system-831abebf172d4350849aecca838547f8878f36d1.zip |
Merge branch 'kenwood' of suva.vyatta.com:/git/vyatta-cfg-system into kenwood
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Vyatta/Login/User.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Vyatta/Login/User.pm b/lib/Vyatta/Login/User.pm index 3038c467..11cf7f23 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(); @@ -212,7 +215,7 @@ sub update { # did we see this user in configuration? next if defined $users{$user}; - warn "User $user not listed in current configuration\n"; + warn "removing $user not listed in current configuration\n"; # Remove user account but leave home directory to be safe system("sudo userdel $user") == 0 or die "Attempt to delete user $user failed: $!"; |