Svn – Mac OS X Server add server user

mac-osxmac-osx-serveropendirectorysvnuser-management

What's the recommended way to add a user to Mac OS X Server that doesn't need all the hoopla associated with Workgroup Manager? There are many users pre-configured in Mac OS X Server (www, root, ldapadmin, etc.) that don't have "Full Name" or mail accounts, etc.

I'd like to create a 'svn' user to be the owner of our Subversion Repository as per this tutorial:

If you've decided to use either Apache
or stock svnserve, create a single svn
user on your system and run the server
process as that user. Be sure to make
the repository directory wholly owned
by the svn user as well. From a
security point of view, this keeps the
repository data nicely siloed and
protected by operating system
filesystem permissions, changeable by
only the Sub- version server process
itself.

Wondering if there's a way outside of WorkgroupManager and OpenDirectory as this account will be entirely server based. Is this still sound advice under OS X Server? If so what's the easiest way to create the user (Mac OS X Server doesn't seem to respond to useradd).

Best Answer

You can add accounts with the dscl command line utility. Depending on where you want to add users (just on that server, or on all machines via OpenDirectory), you can pass an argument to it.

For a standard OD, adding a user looks like: dscl -u USERNAME -P Password /LDAPv3/127.0.0.1 -create /Users/USERNAME UniqueID <put unique ID here>

For a local user, like this: dscl -u USERNAME -P Password / -create /Users/USERNAME UniqueID <put unique ID here>

You'll need a different dscl command for various user attributes. There is a guide for a standard-type user account here: http://osxdaily.com/2007/10/29/how-to-add-a-user-from-the-os-x-command-line-works-with-leopard/

And as always, man dscl!

Related Topic