From 06de833692473549d168081461cc089dbefb8365 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 2 May 2013 14:35:23 -0700 Subject: login: force vyatta user's to have vbash as shell If account already existed in passwd file, but then same user added to Vyatta config, force the shell to be vbash. This fixes case of autologin on initial livecd boot where the autologin happens as 'vyatta' but gets bash instead of vbash as shell. --- lib/Vyatta/Login/User.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Vyatta/Login/User.pm b/lib/Vyatta/Login/User.pm index 411aed6c..1bf058d6 100755 --- a/lib/Vyatta/Login/User.pm +++ b/lib/Vyatta/Login/User.pm @@ -158,12 +158,13 @@ sub _update_user { # make new user using vyatta shell # and make home directory (-m) # and with default group of 100 (users) - $cmd = 'useradd -s /bin/vbash -m -N'; + $cmd = 'useradd -m -N'; } else { # update existing account $cmd = "usermod"; } + $cmd .= " -s /bin/vbash"; $cmd .= " -p '$pwd'"; $cmd .= " -c \"$fname\"" if ( defined $fname ); $cmd .= " -d \"$home\"" if ( defined $home ); -- cgit v1.2.3