How to Add a User from the OS X command line, works with Lion

Yes, you can add a user easily with the built in GUI tool that ships with OS X, but that will setup the account to be able to share music, login, and even modify the dock.  If you want to setup a captive account, you will need to be able to setup an account from scratch.

However, most blog postings are so old and outdated, they are simply wrong.  This is the updated procedure, wherein I setup a captive git account:

sudo dscl . -create /Users/git UserShell /usr/bin/git-shell

sudo dscl . –passwd /Users/git PASSWORD

sudo dscl . -create /Users/git UniqueID 503

sudo dscl . -create /Users/git PrimaryGroupID 1000

sudo dscl . -create /Users/git NFSHomeDirectory /Users/git

cd /Users

sudo mkdir git

sudo chown git git

That should be enough to get you started.

This entry was posted in Mac. Bookmark the permalink.

6 Responses to How to Add a User from the OS X command line, works with Lion

  1. Hello there, I discovered your web site by way of Google even
    as searching for a comparable matter, your website got here up, it appears good.
    I’ve bookmarked it in my google bookmarks.
    Hi there, simply turned into aware of your weblog thru Google, and found that it is really informative. I am gonna be careful for brussels. I’ll be grateful if
    you continue this in future. A lot of other people will likely be
    benefited out of your writing. Cheers!

  2. says:

    I’m not that much of a internet reader to be honest but your
    sites really nice, keep it up! I’ll go ahead and bookmark
    your website to come back later on. Cheers

  3. Wonderful post but I was wondering if you could write
    a litte more on this topic? I’d be very grateful if you
    could elaborate a little bit further. Thanks!

  4. says:

    magnificent submit, very informative. I’m wondering why the other experts of this sector do not
    notice this. You must continue your writing.
    I’m confident, you have a huge readers’ base already!

  5. Kory says:

    hello!,I really like your writing so much! proportion we keep
    in touch extra approximately your article on AOL? I
    need a specialist on this space to solve my problem.

    May be that’s you! Looking forward to see you.

  6. Wonderful goods from you, man. I’ve bear in mind your stuff previous to and you are just extremely wonderful.
    I actually like what you’ve acquired here, certainly like what you are saying and the way through which
    you say it. You’re making it enjoyable and you still take care of to stay it smart.
    I can not wait to learn much more from you. This is actually a terrific site.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s