diff options
author | Stephen Hemminger <shemming@brocade.com> | 2013-05-02 14:35:23 -0700 |
---|---|---|
committer | Stephen Hemminger <shemming@brocade.com> | 2013-05-02 14:35:23 -0700 |
commit | 06de833692473549d168081461cc089dbefb8365 (patch) | |
tree | 8323aca7991fde0d211e6777daebccf6580be0b5 | |
parent | 22c7f9b24a4b04be73eb6b7a901efe19e5cb180c (diff) | |
download | vyatta-cfg-system-06de833692473549d168081461cc089dbefb8365.tar.gz vyatta-cfg-system-06de833692473549d168081461cc089dbefb8365.zip |
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.
-rwxr-xr-x | lib/Vyatta/Login/User.pm | 3 |
1 files changed, 2 insertions, 1 deletions
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 ); |