So far I'm happy to see nearly all of the existing policies we had in JAMF are working correctly in El Capitan. There is always the exception of course. We have one policy that is in Self Service as well as automated in our enrollment process to create a local admin account shared by any service technicians that need to work on the Mac. It's short and sweet and looks like this:
#!/bin/sh
compName=$(scutil --get ComputerName)
acctName="SomeAdmin"
suffix="end of password"
dscl . -create /Users/$acctName
dscl . -create /Users/$acctName UserShell /bin/bash
dscl . -create /Users/$acctName RealName $acctName
dscl . -create /Users/$acctName RecordName "many" "aliases"
dscl . -create /Users/$acctName UniqueID 551
dscl . -create /Users/$acctName PrimaryGroupID 20
dscl . -create /Users/$acctName NFSHomeDirectory /Users/SomeAdmin
dscl . passwd /Users/$acctName "$compName$suffix"
dscl . create /Users/$acctName AuthenticationHint "Some password hint"
dscl . append /Groups/admin GroupMembership $acctName
dscl . append /Groups/staff GroupMembership $acctName
dscl . append /Groups/_lpadmin GroupMembership $acctName
dscl . append /Groups/admin GroupMembership $acctName
dscl . append /Groups/_appserveradm GroupMembership $acctName
dscl . append /Groups/_appserverusr GroupMembership $acctName
createhomedir -c -u $acctName
Now the issue seems to be the very last line. When createhomedir run either through the script or manually entered, the following error (with varying numbers) is generated:
Script result: 2015-10-05 11:09:27.506 userInit[1412:8004] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data 2015-10-05 11:09:27.509 userInit[1412:8004] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data 2015-10-05 11:09:27.514 userInit[1412:8004] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data 2015-10-05 11:09:27.518 userInit[1412:8004] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data 2015-10-05 11:09:27.522 userInit[1412:8004] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data 2015-10-05 11:09:27.523 userInit[1412:8004] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data 2015-10-05 11:09:27.524 userInit[1412:8004] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data 2015-10-05 11:09:27.524 userInit[1412:8004] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data 2015-10-05 11:09:27.524 userInit[1412:8004] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data 2015-10-05 11:09:27.524 userInit[1412:8004] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data 2015-10-05 11:09:27.525 userInit[1412:8004] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data creating home directories for (computername)
I didn't see any references to changes made in createhomedir in the man pages. This also only seems to happen when using the "c" flag, but that is pretty important as we need a local home directory setup.
