Skip to main content
Question

setting default user picture for local users?


bentoms
Forum|alt.badge.img+35
  • Legendary Contributor
  • 4331 replies

Hi guys,

Any idea how to set all local accounts Login Window user icon?

For nw accounts, i swap out  /System/Library/CoreServices/SecurityAgentPlugins/loginwindow.bundle/Contents/Resources/DefaultUserIcon.tiff with my company one.. but can't seem to see how to do this for local accounts?

Would emptying the user pictures folder work?

It's a small thing.. but a nagging one!

Regards,

Ben.

10 replies

Forum|alt.badge.img+24
  • Valued Contributor
  • 1892 replies
  • September 14, 2011

You could probably run a script that would modify all the user accounts with dscl. If I do a

dscl . -read /Users/jared

There's an entry for:

Picture: /Library/User Pictures/Flowers/Lotus.tif

You should be able to easily modify it to whatever image file you want.

j
---
Jared F. Nichols
Desktop Engineer, Client Services
Information Services Department
MIT Lincoln Laboratory
244 Wood Street
Lexington, Massachusetts 02420
781.981.5436


bentoms
Forum|alt.badge.img+35
  • Author
  • Legendary Contributor
  • 4331 replies
  • September 14, 2011

Thanks.. where will that value be written? & where would the template for that file live?


Forum|alt.badge.img+18
  • Valued Contributor
  • 1007 replies
  • September 14, 2011

When you do the dscl . -change /users/jared
That file lives in /var/db/dslocal/nodes/Default/users/jared.plist
But using dscl would be your best bet, as it will make sure to keep directory service up to date with any changes you make.
As to where the template for that lives, that is still a mystery to me.
--
Todd Ness
Technology Consultant/Non-Windows Services
Americas Regional Delivery Engineering
HP Enterprise Services


Forum|alt.badge.img+3
  • New Contributor
  • 7 replies
  • April 26, 2012

hi there,

i'm also trying to change a local user account picture through command.

Let me explain why : I want to change all my machines admin account picture with one of my own and because I have several machines i want to automate this with a script.

I tried many things, and the oe below seems to work but not all the time, wonder why...

In Terminal :

su #my admin username...)
password #enter your password

dscl . -append "/Users/admin" picture "/Library/User Pictures/Animals/Cat.tif"

where admin is the local account you want to change the picture of and cat the new picture.

It seemed to work on 10.6.8, do you have any other clues ?

thanks a lot


stevewood
Forum|alt.badge.img+35
  • Employee
  • 1797 replies
  • April 26, 2012

I use a multi-step process for this via my postinstall script, but you could do it in any script.

First step is to install the image I want to use (in my case it is an image of our company logo). Second is to do some dscl magic:

dscl . delete /Users/admin jpegphoto
dscl . delete /Users/admin Picture
dscl . create /Users/admin Picture "/Library/User Pictures/Integer/integeruser.tif"

I found that by first deleting the keys and then re-creating them it works much better.


Forum|alt.badge.img+3
  • New Contributor
  • 7 replies
  • May 2, 2012

hi there,

doing that from my admin I get this :

par57yr03360:~ admin$ dscl . delete /Users/admin jpegphoto
par57yr03360:~ admin$ dscl . delete /Users/admin Picture
par57yr03360:~ admin$ dscl . create /Users/admin "/wunderman.tif"
<main> attribute status: eDSPermissionError
<dscl_cmd> DS Error: -14120 (eDSPermissionError)


stevewood
Forum|alt.badge.img+35
  • Employee
  • 1797 replies
  • May 2, 2012

You would need to sudo those commands. I run those from a script pushed by Casper, so they run as root. If you want to run them from the terminal by hand, you'd want to run:

sudo dscl . delete /Users/admin jpegphoto
sudo dscl . delete /Users/admin Picture
sudo dscl . create /Users/admin Picture "/wunderman.tif"

Forum|alt.badge.img+3
  • New Contributor
  • 7 replies
  • May 2, 2012

even with a sudo before, and even logged in as root it doesn't work on a 10.6.8 :(

The image permissions are everyone Read and write... in the folder Animals of /library/user pictures ..

whats wrong ?


Forum|alt.badge.img+3
  • New Contributor
  • 7 replies
  • May 3, 2012

check ou this post :

https://jamfnation.jamfsoftware.com/discussion.html?id=4332


Forum|alt.badge.img+2
  • New Contributor
  • 14 replies
  • July 22, 2013

I am trying to do this as well and in the samples shown in this post the user name is known. So how does this set to everyone (IE all computers) in district not matter who the user is?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings