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(-) 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 From 96dcfb150bd33ba0f5c158c27d7077f27fa1223d Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 27 Jan 2010 18:20:19 -0800 Subject: Make message clearer But I doub that anyone will ever read it... --- lib/Vyatta/Login/User.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Vyatta/Login/User.pm b/lib/Vyatta/Login/User.pm index cc28fd1e..11cf7f23 100755 --- a/lib/Vyatta/Login/User.pm +++ b/lib/Vyatta/Login/User.pm @@ -215,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: $!"; -- cgit v1.2.3 From d8775dbac40e0f1a3ebadb41097b70d785a15013 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 27 Jan 2010 18:21:04 -0800 Subject: 0.16.31 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 732a2c6b..a2b0ab99 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +vyatta-cfg-system (0.16.31) unstable; urgency=low + + * Allow local user (non vbash) accounts + * Make message clearer + + -- Stephen Hemminger Wed, 27 Jan 2010 18:21:04 -0800 + vyatta-cfg-system (0.16.30) unstable; urgency=low * Don't delete non-user accounts -- cgit v1.2.3