OS XはUNIXなので、もちろんコマンドラインからユーザーを作ることができる。ただし、Linuxなどにあるuseradd / adduserのようなコマンドはない。じゃあどうするかというと、「dscl」コマンドを使う。 dsclは「Directory Service Command Line Utility」の略だそうで、以下のようにすればPrimaryのGIDが1000、UIDが505のユーザーhogeを作成できる。 # dscl . -create /Users/hoge # dscl . -create /Users/hoge UserShell /bin/bash # dscl . -create /Users/hoge RealName "HogeHoge" # dscl . -create /Users/hoge UniqueID 505 # dscl . -create /