我已经设置了一个带有openssh登录docker映像的archlinux,我强制用户在第一次登录时更改密码。但更改密码过程将因“身份验证失败”而停止。与普通的实机archlinux一样,它会显示“newpassword:”提示,我对real arch linux box的测试过程是
# chage -d0 myuser
# ssh -l myuser localhost
myuser@localhost's password:
You are required to change your password immediately (administrator enforced)
WARNING: Your password has expired.
You must change your password now and login again!
Change password for myuser.
Current password:
New password: <- in Docker, it won't show this
Retype newpassword:
我的docker测试过程
docker run -i -t --rm base/archlinux /bin/bash
pacman -Sy --noconfirm openssh
ssh-keygen -A
useradd -m myuser
echo -e "pass\npass" | passwd myuser
chage -d0 myuser
/usr/bin/sshd -D &
ssh -l myuser localhost