10 Replies Latest reply on Feb 12, 2010 1:24 PM by Snowman

    How to set default home page for Mac OS users

    Rookie

      We recently pushed out a GPO on Active Directory that forces our intranet to be the default home page.  Is it possible to do the same with our Mac OS systems via Landesk?  If so, would this be effective for both Safari as well as other browsers?

        • 1. Re: How to set default home page for Mac OS users
          SupportEmployee

          LANDesk really doesn't duplicate the functionality of a AD GPO.

           

          That said there are ways you can changed the home page if you know the correct preference file. Then it is just a matter of scheduling out a .sh file of course the user could still change it after the script was run. Maybe adding a script to startup might be a solution? Or you could setup custom vulnerability and script detection and repair.

           

          It's not a difficult script for instance to change the page for Safari 4 it's just a matter of running:

           

          defaults write com.apple.internetconfigpriv WWWHomePage http://www.landesk.com

           

           

          If you want to do something a little more complicated or need help with scripts I've found http://macscripter.net/ to be a good resource.

          • 2. Re: How to set default home page for Mac OS users
            Apprentice

            While you can push out any script with LANDesk and change whatever you want, the problem is that it wouldn't be "forced" like with GPO. Users would still be able to change. Also, the home page is set at the user level, you would have to script it so it changes the setting for each user on the system. Something like this is better handled with Open Directory which would require a Mac server and binding your Macs to it (as well as AD if want to use that for authentication). Or you can look at products like Centrify DirectControl or Likewise Enterprise which allow you to apply Mac specific GPO from AD (settings stored in SYSVOL on the DC's).

            • 3. Re: How to set default home page for Mac OS users
              Rookie

              Hello Snowman,

               

              Thanks for the reply.  You are going to have to forgive me but I am a Landesk and scripting newbie.  Also, I am ok with this not being a persistent change like with a GPO.

               

              So, does this mean that I can create a shell script with that one line of code you specified and then push it out with as a distribution package with Landesk?

               

              Thanks!

              Donovan

              • 4. Re: How to set default home page for Mac OS users
                Rookie

                Hi Patrick,

                 

                This is going to be interesting to apply it at the user level.  How can that be done with the script?

                 

                I like your suggestion of using a mac server which we do have but it is being used as a test lab.  We are also binding the macs to our AD.  Do you know where in the Mac OS server this would be specified for the default home page?

                 

                Since we are trying to do this with the tools/resources we already have, a script pushed out via landesk or the mac server are going to have to be our options. 

                 

                Thanks,

                Donovan

                • 5. Re: How to set default home page for Mac OS users
                  Rookie

                  Hello,

                   

                  Just wanted to follow up on this.  We created the shell script on an imac and ran it.  This is what we got as a response:

                   

                  Line 1: +default: command not found

                   

                  Comint exit abnormally with code 127 at Fri Feb 12 09:55:40

                   

                  Am I missing something or did we not create the script in the right format?

                   

                  Thanks,

                  Donovan

                  • 6. Re: How to set default home page for Mac OS users
                    Apprentice

                    You want "defaults", not "default".

                    • 7. Re: How to set default home page for Mac OS users
                      Rookie

                      Ok, so I added the "s" so that it reads defaults but still got the same message:

                       

                      Line 1: +defaults: command not found

                      • 8. Re: How to set default home page for Mac OS users
                        Apprentice

                        LANDesk might not be using the $PATH to search for commands.

                         

                        Try /usr/bin/defaults

                         

                        But this is only going to apply to the root user anyway.

                         

                        Try this (I have not tested):

                         

                        #!/bin/sh
                        
                        for i in `ls /Users | grep -v .localized | grep -v Shared`
                            do defaults write /Users/$i/Library/Preferences/com.apple.internetconfigpriv WWWHomePage http://www.yourcompany.com
                        done
                        

                         

                        Save that script to a text fle, save it with a .sh extension, run "chmod +x filename.sh" on it to make it executible. Zip it up and add it to LANDesk as a Mac software package.

                         

                        Test it locally on your system first.

                         

                        sudo /path/to/filename.sh
                        
                        • 9. Re: How to set default home page for Mac OS users
                          Apprentice

                          dzap wrote:

                           

                          Hi Patrick,

                           

                          This is going to be interesting to apply it at the user level.  How can that be done with the script?

                           

                          I like your suggestion of using a mac server which we do have but it is being used as a test lab.  We are also binding the macs to our AD.  Do you know where in the Mac OS server this would be specified for the default home page?

                           

                          Since we are trying to do this with the tools/resources we already have, a script pushed out via landesk or the mac server are going to have to be our options. 

                           

                          Thanks,

                          Donovan

                           

                          You don't just "specify a home page" from the Mac server. I'm referring to deploying Open Directory which is a large task for just setting a home page. You wouldn't deploy AD just for that one purpose. If you are interested in looking at OD, read up on the Open Directory Administraton guide and User Management at http://www.apple.com/server/macosx/resources/documentation.html

                          • 10. Re: How to set default home page for Mac OS users
                            SupportEmployee

                            Patrick you bring up a good point. I didn't think about it being a profile preference. That makes scripting a solution more difficult as you would need a script that would update the com.apple.internetconfigpriv.plist in each profile and in so doing I don't know if you can still use the defaults command (I am no means a script expert maybe you can) or if you would have to use plutil -convert xml1 com.apple.internetconfigpriv.plist to convert the plist to xml make the change and then change it back to a binary (.plist) with plutil -convert binary1 com.apple.internetconfigpriv.plist. The script defiantly gets more complicated very quickly. It makes using a OSX Server all the more appealing.

                             

                            As far as using the server solution Patrick mentioned earlier (assuming you have open directory in place) you would go into Workgroup Manager on your server. Click the Preferences icon at the top and then select the Details tab in the main window area. Then it is just a matter clicking the + sign to add the com.apple.internetconfigpriv.plist file and set the values you want it to have such as the home page.

                             

                            I you don't know what your level of Mac in the enterprise knowledge is but if it isn't very high you might see if your company will get you http://apress.com/book/view/9781430224433 or a similar book.