If you're running OS X Yosemite and above, you can use the new "sysadminctl" command to easily create users from the command line.

sudo sysadminctl -addUser keith -password mypassword