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.

About these ads
This entry was posted in Mac. Bookmark the permalink.

One Response 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!

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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