Add a new user on OSX Snow Leapard Server from the command line

command-line-interfacemac-osxuser-management

I have a Mac OSX server running Snow Leapord. I only have ssh access, and I have root access. I want to add a new user. I'm a long time unix user and was a bit suprised to see adduser and useradd not available. A bit of digging (e.g. this SO question) shows that it's not as straight forward.

I've tried things I've read, such as nitool ("command not found"), and dscl / -create ... ("Data Source (/) not valid"). So how the hell do I create a new user user on the command line in OSX?!

Best Answer

This manual gives information on using dscl. Also see this.

Here is some older information on niutil.