/dev/tty must be world-writable. Log in as root and do a chmod 666 /dev/tty and the problem will immediately be fixed.