ubuntu compatible password change function

This commit is contained in:
Serghey Rodin 2013-06-23 17:27:07 +03:00
commit c1dad6ce08
5 changed files with 22 additions and 16 deletions

View file

@ -68,7 +68,7 @@ fi
-M -d "$HOMEDIR/$user/web/$domain" \
$ftp_user > /dev/null 2>&1
echo "$ftp_password" | /usr/bin/passwd "$ftp_user" --stdin &>/dev/null
echo "$ftp_user:$ftp_password" | /usr/sbin/chpasswd
ftp_md5="$(awk -v user=$ftp_user -F : 'user == $1 {print $2}' /etc/shadow)"