Cant give you a script but you should take a look at the CLT documentation.Look this two up:iwadduser.ipl and iwgroup.exe.It is pretty simple and you can script it in you fav scripting language.
Both exist but you are half correct...
To automate adding users on unix/linx dont you need to users to OS first. Do you have ldap/domain authentication setup ?