Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

« Newer Snippets
Older Snippets »
3 total  XML / RSS feed 

add user in os x or os x server with NetInfo

Adding an OS X/OS X Server user with NetInfo. Antiquated by servermrg, but still functional.

niutil -create . /users/fred
niutil -createprop . /users/fred gid [groupID]
niutil -createprop . /users/fred uid [uniqueNumberOver1000]
niutil -createprop . /users/fred shell /bin/tcsh
niutil -createprop . /users/fred home /Users/fred
niutil -createprop . /users/fred realname "fred jones"
niutil -createprop . /users/fred passwd '*'
mkdir /Users/fred
mkdir /Users/fred/.ssh
chown -R fred /Users/fred
chgrp -R [groupID] /Users/fred
chmod 755 /Users/fred

Change root password in OS X Server

In Terminal:

passwd root

Change admin password in OS X Server

Bad things can happen if you change the administrator password on OS X server the wrong way. The right way is to change it via Workgroup Manager (NOT System Preferences) or via this command in Terminal:

passwd admin
« Newer Snippets
Older Snippets »
3 total  XML / RSS feed