| the command you are running, "passwd", is to change the password used by the user you are logged in as. It fails because the command is trying to set your password, but you are typing in the password of the root user. See "man passwd"
If you fail to be able to run the "su" command, add yourself to the wheel group to give yourself permission:
switch to fresh terminal with ctrl-alt-f2
login as root
gpasswd -a YOUR_USERNAME wheel |