Skip to content

Commit

Permalink
change shell on package change
Browse files Browse the repository at this point in the history
  • Loading branch information
serghey-rodin committed Feb 25, 2013
1 parent 0d9e7d0 commit 852f937
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/v-change-user-package
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ fi
# Changing user package
change_user_package

# Update user shell
shell_path=$(/usr/bin/chsh --list-shells | grep -w "$SHELL" |head -n1)
/usr/bin/chsh -s "$shell_path" "$user" &>/dev/null


#----------------------------------------------------------#
# Vesta #
Expand Down
4 changes: 4 additions & 0 deletions bin/v-rebuild-user
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ source $USER_DATA/user.conf
shell=$(chsh --list-shells | grep -w "$SHELL" |head -n1)
adduser "$user" -s "$shell" -c "$CONTACT" -m -d "$HOMEDIR/$user" &>/dev/null

# Update user shell
shell_path=$(/usr/bin/chsh --list-shells | grep -w "$SHELL" |head -n1)
/usr/bin/chsh -s "$shell_path" "$user" &>/dev/null

# Update password
shadow='/etc/shadow'
shdw=$(grep ^$user: $shadow)
Expand Down

0 comments on commit 852f937

Please sign in to comment.