Debian用echo修改密码

Debian\Ubuntu和CentOS

Debian\Ubuntu

echo 'username:password' | chpasswd
CentOS

echo "password" | passwd --stdin username