We help IT Professionals succeed at work.

set a safari homepage for all users

mcdermk asked
I would like to set a Homepage in Safari for all users.  I would  like Safari to open to our school district homepage for whoever logs on.
Watch Question

Thomas GrassiSystems Administrator

You need to write a script for all the users

See this link here that might help

This may be simpler.
If you have existing users you can use the defaults command to set it for each user.

In each user account, you can just use the defaults command to change it.
defaults write com.apple.Safari HomePage http://www.MyDistrictSchoolPage.com

If you have multip users.
for i in List_Of_Users do;   "su - $i defaults write com.apple.Safari HomePage http://www.MyDistrictSchoolPage.com"; done

Open in new window

If you don't have any users yet, you can set the defaults system wide first.
sudo defaults write /Library/Preferences/com.apple.Safari HomePage http://www.MyDisctrictSchoolPage.com

Every user that starts Safari will get that as the initial home page, but they can still change it later.

If you don't want users to change their settings, you should do both of the above then make the user's Safari Preferences file read only or owned by root

chmod -w  ~USER/Library/Preferences/com.apple.Safari.plist
sudo chown root ~USER/Library/Preferences/com.apple.Safari.plist