Date created: 01/20/13 15:07:07. Last modified: 01/20/13 15:08:05

Create AD Home Directories

Read usersnames over dscl from AD in magic triangles set up to create home directories on OS X file server

#!/bin/bash

dscl /Active\ Directory/All\ Domains read /Groups/EDUCATION\\$1 GroupMembership | grep -v "GroupMembership:" | while read USERS; do
	createhomedir -u `echo $USERS | sed 's/EDUCATION//' | sed 's/ //'`
done