Modifying OS X User Template

For system admins that often require uniform user creation on their machines, it often involves the laborious task of creating users and manually copying files over to each users home folders.
There is, however, a much easier and faster way of automating this task.
When a user is created in OS X, there are a series of default folders being created such as Desktop, Documents, Pictures etc.

how to modify the os x user template

 
It is often the case that you may want to have certain documents, pictures or even preferences uniformly created across all newly created accounts, such as having the Security Policy of the organization as a PDF on the Desktop of every user or a set of Images.
The easiest way of ensuring this, is by modifying the Systems User Template to include that file on the Desktop of every user. To do so, follow these simple steps (Warning: you need to use command line as root user)
The User Template is being picked up from a folder located under:

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

Open Terminal and elevate yourself to root by doing the following:

sudo –s

enter your root password.
Change your directory to the user template folder by:

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

NB: The “” in the User Template is not actually a character but a separator in command line, as there is in fact a space between the two words “User Template” and you need to insert “” to inform bash to expect a space in that location. If you do not enter this, it will ignore everything post User and inform you that “bash: cd: /System/Library/User: No such file or directory”
If you list the contents of that folder, you will see the following:
As you can see, these are indeed the default folders created automatically with every user account.

os x user template

 
In our scenario, to add a PDF on the Desktop of every newly created user account, all you need to do is copy the PDF into the Desktop folder inside the User Template folder. To perform this task do the following:

cp /location/of/the/PDF/ /System/Library/User Template/English.lproj/Desktop/

That’s it.