mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 21:34:12 -07:00
change shell on package change
This commit is contained in:
parent
0d9e7d06ec
commit
852f937acc
2 changed files with 8 additions and 0 deletions
|
@ -133,6 +133,10 @@ fi
|
||||||
# Changing user package
|
# Changing user package
|
||||||
change_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 #
|
# Vesta #
|
||||||
|
|
|
@ -40,6 +40,10 @@ source $USER_DATA/user.conf
|
||||||
shell=$(chsh --list-shells | grep -w "$SHELL" |head -n1)
|
shell=$(chsh --list-shells | grep -w "$SHELL" |head -n1)
|
||||||
adduser "$user" -s "$shell" -c "$CONTACT" -m -d "$HOMEDIR/$user" &>/dev/null
|
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
|
# Update password
|
||||||
shadow='/etc/shadow'
|
shadow='/etc/shadow'
|
||||||
shdw=$(grep ^$user: $shadow)
|
shdw=$(grep ^$user: $shadow)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue