5 Replies Latest reply: Oct 2, 2012 5:58 PM by Strontium90
DeNeiTor Level 1 (0 points)

How I can accomplis this?

MacBook Air, OS X Mountain Lion (10.8.2)
  • Strontium90 Level 4 (3,770 points)

    There are a number of ways this can be accomplished.  The most direct is to modify the user template.  This is located in /System/Library/User Template/.  There are templates in there that allow you to customize many different languages but you likely want English.lproj.  Or you can populate Non_localized as the creation of a home folder merges the contents of Non_localized with the current default language.


    Files moved in here should be owned by root and anything in the template will be copied to the user's home folder on home folder creation.  Note, if you have existing users, this solution does not address them. The User Template is only referenced on account creation.


    To handle that you need to use MCX (requires OS X Server but is depreciated as of 10.8), Profile Manager (not as granular as MCX), Centrify if you are integrated with AD and don't have OS X Server, or a tool like JAMF to manage all the MCX after the fact.


    If you only need a few items set, you can tweak the AD default template as this contains some basic MCX key value pairs.  Although, I have not tried this yet in Mountain Lion so maybe ignore this.


    If you have no access to any of those, you can pull this off with Apple Remote Desktop and some scripting skills.  The defaults command can set many preferences and with some creativity you can send this as a unix command to a fleet of systems and modify all users at once.

  • DeNeiTor Level 1 (0 points)

    Hi Strontium90,


    I got some preferences already set up over all user, less wallpaper background and sidebar icons on finder. When I'm copying the sidebarlist settings, it will load into new users but those locations are without authorized access.


    It seems like every time I click on an icon on sidebar, it want to open a folder where I dont have access.


    Any suggestion?

  • Strontium90 Level 4 (3,770 points)

    So it sounds like this is your scenario:


    You are logging in as the admin account and placing images that you want to be used by all users in the admin's home folder.  For sake of argument, let's say you are placing them in /Users/admin/Library/Desktop Pictures/.  Now, you then set the background by pointing to a file in /Users/admin/Library/Desktop Pictures/ which records the absolute path to the background image in the preference file.  You then copy that preference and distribute it to all users through user template, MCX, or which ever method you would like.  Other users log in and they do not have access to the desktop background.


    The cause is simple.  It is an access rights problem.  You are storing the images in a user's home and other users on the machine will not have access to the data in that path.


    If you want to use a custom background, store the files in /Library/Desktop Pictures.  This is the Apple defined location to store common assets like this.  Then define your preference file to reference the image from that location.  /Library/Desktop Pictures is readable by all users so there will not be a problem distributing this out to everyone.

  • DeNeiTor Level 1 (0 points)

    Thanks Strontium90,


    I saved the background image into:

    System/Library/User Template/English.lproj/Library/Preferences


    I supposed this folder is reacheable. Could it be like this? And the last...which file is containing the background preference on my user folder?


    Thank you for all your help!

  • Strontium90 Level 4 (3,770 points)

    If you save the file in System/Library/User Template/English.lproj/Library/Preferences then it is only referenced during account creation.  Now if the preference file is referencing the file with a relative path (~/Library/Preferences/image.jpg) than this will work for all NEW user accounts.


    The better place to put it is /Library/Desktop Pictures as this is accessible to all users (System/Library/User Template/English.lproj/Library/Preferences is not accessible to anyone but root).  Then when the path to the file is recorded in the preference file, it can be an absolute path (/Library/Desktop Pictures/image.jpg).