How to Schedule a Regular Assessment of a System Using Its Default Policy
You must be assigned the Compliance Assessor rights profile to schedule assessments that can be added to the assessment store. To run the svccfg
, you must be assigned the Service Configuration rights profile. For more information, see Rights to Run Compliance Assessments and Reports and Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.4.
Example 1-9 Setting the Default Policy to a Benchmark or Profile
This example sets the default policy to the Recommended
profile of the solaris
benchmark.
$ compliance list -p pci-dss: Solaris_PCI-DSS solaris: Baseline, Recommended $ compliance set-policy -b solaris -p Recommended $ compliance get-policy Benchmark: solaris Profile: Recommended Tailoring:
Example 1-10 Running the ehc
Benchmark
This example shows you how to install the ehc-solaris-policy
package, list the installed benchmarks, and run the ehc
benchmark.
$ pkg install ehc-solaris-policy ... $ compliance list -b ehc pci-dss solaris $ compliance assess -b ehc ...
Example 1-11 Setting the Default Policy to an Installed Tailoring
This example sets the default policy to the RKerberos
tailoring, which the administrator installed as a package.
$ compliance set-policy -b solaris -t RKerberos $ compliance get-policy Benchmark: solaris Profile: Recommended Tailoring: RKerberos
For the contents of the RKerberos
tailoring, see Creating a Kerberos Tailoring From the Recommended Profile.
Example 1-12 Scheduling the Weekday and Hour of an Assessment
In this example, the root
role adds to the default schedule by specifying the day of the week and the hour that the assessment should run. After refreshing the service, root
checks that the new schedule is valid.
$ pfbash ; svccfg -s compliance:default setprop scheduled/day = astring: Sunday $ svccfg -s compliance:default setprop scheduled/hour = integer: 2 $ svccfg -s compliance:default listprop scheduled scheduled schedule scheduled/frequency integer 1 scheduled/interval astring week scheduled/day astring Sunday scheduled/hour integer 2 $ svcadm refresh compliance:default $ svcs -x compliance:default svc:/application/security/compliance:default (Scheduled compliance assessment) State: online since Fri Jan 08 11:11:11 2016 ...
Example 1-13 Running a Policy Assessment Daily
In this example, the root
role changes the assessment to run daily after 2 a.m. After refreshing the service, root
checks that the new schedule is in effect.
$ pfbash ; svccfg -s compliance:default setprop scheduled/interval = astring: day $ svccfg -s compliance:default setprop scheduled/hour = integer: 2 $ svcadm refresh compliance:default $ svccfg -s compliance:default listprop scheduled scheduled schedule scheduled/frequency integer 1 scheduled/interval astring day scheduled/hour integer 2 $ svcs compliance:default STATE STIME FMRI online 11:11:11 svc:/application/security/compliance:default $ svcs -o lrun,nrun compliance:default LRUN NRUN - Jan_08