How to add a user in VM Template Start Script

The command “adduser $UNAME --stdin” is invalid, check manpages of adduser.

There are older threads that explain how to add users with START_SCRIPT Adding users to VM instatiated from linux template

$ cat user.one
CONTEXT = [ USERNAME = root, PASSWORD = password, NETWORK = YES, START_SCRIPT=“useradd -m -s /bin/bash test_user && echo -e \“pass\npass\” | passwd test_user” ]
$ onetemplate update testvm -a user.one
$ onetemplate instantiate testvm
$ onetemplate show testvm

TEMPLATE CONTENTS
CONTEXT=[
NETWORK=“YES”,
PASSWORD=“password”,
START_SCRIPT=“useradd -m -s /bin/bash test_user && echo -e \“pass\npass\” | passwd test_user”,
USERNAME=“root” ]