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

Thanks to galaxy4sale for the report.