I am trying to check user password via login command like this:
# echo "name\npassword" | login
but the command ends without writing anything.
echo ends because of SIGPIPE.
login stop before asking for name and password?
When I do the same with
passwd command, it works:
# echo "password\npassword" | passwd Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
I have Ubuntu 12.04 and Bash 4.2.25