Fixed #7423 -- Skip user creation when not in a TTY.

This is a RFC commit.

Thanks to galaxy4sale for the report.