Local account creation error in El Capitan 10.11

dcgagne
Contributor

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.

5 REPLIES 5

andrew_nicholas
Valued Contributor

I'm getting the same issue with an Acceptable Use Policy made with JAMFHelper. Haven't found the root cause yet.

karthikeyan_mac
Valued Contributor

Hi,

We can use "sudo -u $(ls -l /dev/console | awk '{print $3}')" in front of any GUI Dialog (jamfhelper or applescript)" to solve the issue in OS X 10.11.

sudo -u $(ls -l /dev/console | awk '{print $3}') jamfhelper command

Thanks & Regards,
Karthikeyan

alexissantina
New Contributor

This happens to us when we manually try to create a user account after imaging with Casper Imaging. Is there a way to fix this process without using a script?

ronb
New Contributor II

We are seeing the same "Failed" policy with the "RemoteUpdateManager[9562:46128] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data" string we get above from an update policy that has a terminal command that updates Adobe apps - "/usr/local/bin/RemoteUpdateManager".

This only happens on our Mac systems running Mac OS 10.11. I am assuming it's tied to the new SIP measures in El Capitan. The command seems to work, updating our Adobe apps, but we don't know how to prevent all these failure notices in Casper.

We are still on JSS 9.8.1. I read a possible fix may be in 9.8.2, but another user reported it did not fix this issue.

Any solutions found for this?

dcgagne
Contributor

The only "fix" we were able to muster for the time being was sending the output of that command to /dev/null so the binary wouldn't pick up on the error.

We're running 9.81 as well, but are upgrading to 9.92 soon. My guess is they change in error reporting will fix this problem.