I really needed an adduser like program on MacOSXÂ and after a few searches on the internet I found a script that works like the linux adduser program.
I remember I had to modify it to use bash ( my preferred shell ) as the default shell and I make it use the right path when copying the user template. I can't remember exactly where I found it so if you have seen this someplace else feel free to let me know and I'll be happy to give credit.
Here it is :
span style="color: #ff0000;">"Enter username:""Enter the full name for user $newuser's:""Will $newuser an Admin user (y/N)?"'{print $3f}'"$long_name""""/bin/bash""/Users/$newuser""$is_admin" = Y -o "$is_admin"
for MacOSX leopard and later read this : http://osxdaily.com/2007/10/29/how-to-add-a-user-from-the-os-x-command-line-works-with-leopard/