Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Basically, I want change the skeleton of the OS X user account, in order to do the following with every new user that I create on this local machine:

  • A custom set of Dock icons
  • Some data already in their Documents folder
  • Some aliases on the desktop to some remote resources (smb, mainly)
  • Screen saver and lock settings set up.

I don't need any of these to be locked down by policy, I just want to configure a few of them for easier access. There's a possibility of having an OS X directory server at some point, but I can't rely on it being possible/available.

share|improve this question
add comment

3 Answers

up vote 8 down vote accepted

IIRC OS X's equivalent of the linux /etc/skel is

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

As long as your customizations are stored in the user's home folder, then placing them here should make them be copied along with the rest of the defaults when you create a new user. All you have to do is find the config file that controls what you want to set as the default, then copy the pre-configured version over the default in that directory.

EDIT

Thanks to Gordon Davisson for the addition.

Note that the template folder is owned by root, and any additions you make should be as well. So, if (for example) you wanted to copy your account's Dock preferences into the template, you'd use

sudo cp ~/Library/Preferences/com.apple.dock.plist /System/Library/User\ Template/English.lproj/Library/Preferences
share|improve this answer
1  
Note that the template folder is owned by root, and any additions you make should be as well. So, if (for example) you wanted to copy your account's Dock preferences into the template, you'd use sudo cp ~/Library/Preferences/com.apple.dock.plist /System/Library/User\ Template/English.lproj/Library/Preferences –  Gordon Davisson Jul 16 '10 at 0:21
    
+1 Excellent point. I added it to my answer, with thanks. –  elmugrat Jul 16 '10 at 11:11
add comment

For the dock, you need not only the .plist file as mentioned already, but also the com.apple.dock.db file, so you probably want

sudo cp ~/Library/Preferences/com.apple.dock.* /System/Library/User\ Template/English.lproj/Library/Preferences

You will also want to play with the defaults read and defaults write commands, which allow you to see what exactly is included in a preference file before copying it. If you don't want to copy the entire preferences file, you can selectively write values. If the destination file does not exist, it will be created. For example, this command will create the finder plist file with just this one preference:

defaults write /System/Library/User\ Template/English.lproj/Library/Preferences/com.apple.finder ShowPathBar -bool YES
share|improve this answer
add comment

A simple way would be to configure an account the way you want it and keep it solely for use as a template. You could move it to somewhere other than /Users if you want to get it out of sight. Then, to create such a new user account for, say, 'joeuser':

  • Copy the template folder to /Users/joeuser
  • Create an account with the short name 'joeuser'
  • When OS-X notices that a home folder named 'joeuser' already exists and offers to use it, say Yes.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.