"Account Picture Location" option for local account creation doesn't work

palmeida
New Contributor III

Pushing a local account through a policy and specifying the account picture location to something native like "/Library/User Pictures/Animals/Owl.tif" doesn't work and it instead uses a random image from User Pictures/

2 REPLIES 2

Hugonaut
Valued Contributor II

try using a jpg instead, i have no experience using a tif

# Reset User Default Photo 
#########################################################################################

#Current User
CURRENT_USER=$(/usr/bin/python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "
");')

# Delete the hex entry for jpegphoto
dscl . delete /Users/$CURRENT_USER jpegphoto
dscl . delete /Users/$CURRENT_USER Picture
dscl . create /Users/$CURRENT_USER Picture "/Library/User Pictures/Animals/Owl.jpg"

#  This forces the system to rebuild the system caches 
#+ along with the local directory cache.

kextcache -system-caches
________________
Looking for a Jamf Managed Service Provider? Look no further than Rocketman
________________


Virtual MacAdmins Monthly Meetup - First Friday, Every Month

palmeida
New Contributor III

Thanks Hugonaut, that was very fast. However, we're trying to keep things off of scripts as much as possible so that our non-scripting counterparts can modify policies as well. This is a jamf pro feature that should work but doesn't. The images are all the default Mac OS user images .tif.
0e6c3d46f13242e0a78ae42b1d038491