We help IT Professionals succeed at work.

set a safari homepage for all users

mcdermk
mcdermk asked
on
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.
Comment
Watch Question

Thomas GrassiSystems Administrator

Commented:
You need to write a script for all the users

See this link here that might help

http://stackoverflow.com/questions/22842016/launch-shell-script-on-login-in-mac-os-os-x
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