Separate more commands so single.sh can build them standalone.
The only illegal characters in a username are ":" (field separator), "\n" (line separator), and "/" (filename separator).

Restricting usernames to the legacy posix character allowed set (for filenames,
so the $HOME directory is creatable on VFAT and similar) means you can't have
UTF-8 usernames. Linux allows any character but / and NUL in filenames.
Since root is creating these entries, we assume root knows what it's doing.