Mananged User Profile Pic

rkelegha
New Contributor III

f4638dd16ead4377832da39dfb3bbe0a
Hi All,

Is there a way I can have a default picture for all my users on their login screen, Currently I have the picture stored in the Library/User Pictures but I now need to have it default for all my users pictures.
Any ideas?f09df9861b6544ddabbe6befe1292adf
I dont want user to have to manually select it.

3 REPLIES 3

rkelegha
New Contributor III
 

andrew_nicholas
Valued Contributor

There is a DSCL element that points to the user picture you could likely use in a script, though in my experience its more intended for local accounts than AD accounts. I apply a base icon only at default setup going with a low brow method: remove/move all existing icon pictures and leave only the company default in place. It won't prevent a user from changing it, and it will change when the system upgrades OS, but for a first run method it has worked pretty well.

Edit, this is what you're probably logging for:

#!/bin/sh
dscl . read /Users/[shortname] Picture

DBrowning
Valued Contributor II

we force set our users icons as well... here is the script i use...

#!/bin/sh

# Get Logged in User
loggedInUser=`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 any Photo currently used.
dscl . delete /Users/$loggedInUser jpegphoto
sleep 1
# Delete File path
dscl . delete /Users/$loggedInUser Picture
sleep 1
# Set New Icon
dscl . create /Users/$loggedInUser Picture "/Library/User Pictures/picture.tif"