Creating users on OSX 10.5 and up from the command line

mac-osxterminaluser-management

Is this even possible anymore? I've seen tutorials which use niutil (not available on my Mac) and dscl.

My output from dscl is the following though, kind of odd:

neutron:~ username$ sudo dscl / -create /Users/deadline
Data source (/) is not valid.

Best Answer

/ isn't a valid node name (think network host names); for the local host's default store you can use ., or use localhost to specify the store.

$ sudo dscl . -create /Users/deadline                       # the common way
$ sudo dscl localhost -create /Local/Default/Users/deadline # same thing