System Administration Guide: Basic Administration

ProcedureHow to Create an SMF Profile

A profile is an XML file which lists SMF services and whether each should be enabled or disabled. Profiles are used to enable or disable many services at once. Not all services need to be listed in a profile. Each profile only needs to include those services that need to be enabled or disabled to make the profile useful.

  1. Create a profile.

    In this example, the svccfg command is used to create a profile which reflects which services are enabled or disabled on the current system. Alternately, you could make a copy of an existing profile to edit.

    # svccfg extract> profile.xml

    If you are using JumpStart, if you have large numbers of identical systems, or if you want to archive the system configuration for later restoration, you may want to use this procedure to create a unique version of a SMF profile.

  2. Edit the profile.xml file to make any required changes.

    1. Change the name of the profile in the service_bundle declaration.

      In this example the name is changed to profile.

      # cat profile.xml
      <service_bundle type=`profile` name=`profile`
    2. Remove any services that should not be managed by this profile.

      For each service, remove the three lines that describe the service. Each service description starts with <service and ends with </service. This example shows the lines for the LDAP client service.

      # cat profile.xml
       <service name='network/ldap/client' version='1' type='service'>
               <instance  name='default' enabled='true'/>
    3. Add any services that should be managed by this profile.

      Each service needs to be defined using the three line syntax shown above.

    4. If necessary, change the enabled flag for selected services.

      In this example, the sendmail service is disabled.

      # cat profile.xml
        <service  name='network/smtp' version='1' type='service'>
          <instance  name='sendmail' enabled='false'/>
  3. When necessary, apply the new profile.

    See How to Apply an SMF Profile for instructions.