System Administration Guide: Virtualization Using the Solaris Operating System
Previous Next

Editing and Validating Project Attributes

You can use the projadd and projmod project database administration commands to edit project attributes.

The -K option specifies a replacement list of attributes. Attributes are delimited by semicolons (;). If the -K option is used with the -a option, the attribute or attribute value is added. If the -K option is used with the -r option, the attribute or attribute value is removed. If the -K option is used with the -s option, the attribute or attribute value is substituted.

How to Add Attributes and Attribute Values to Projects

Use the projmod command with the -a and -K options to add values to a project attribute. If the attribute does not exist, it is created.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Add a task.max-lwps resource control attribute with no values in the project myproject. A task entering the project has only the system value for the attribute.
    # projmod -a -K task.max-lwps myproject
  3. You can then add a value to task.max-lwps in the project myproject. The value consists of a privilege level, a threshold value, and an action associated with reaching the threshold.
    # projmod -a -K "task.max-lwps=(priv,100,deny)" myproject
  4. Because resource controls can have multiple values, you can add another value to the existing list of values by using the same options.
    # projmod -a -K "task.max-lwps=(priv,1000,signal=KILL)" myproject

    The multiple values are separated by commas. The task.max-lwps entry now reads:

    task.max-lwps=(priv,100,deny),(priv,1000,signal=KILL)

How to Remove Attribute Values From Projects

This procedure uses the values:

task.max-lwps=(priv,100,deny),(priv,1000,signal=KILL)
  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. To remove an attribute value from the resource control task.max-lwps in the project myproject, use the projmod command with the -r and -K options.
    # projmod -r -K "task.max-lwps=(priv,100,deny)" myproject

    If task.max-lwps has multiple values, such as:

    task.max-lwps=(priv,100,deny),(priv,1000,signal=KILL)

    The first matching value would be removed. The result would then be:

    task.max-lwps=(priv,1000,signal=KILL)

How to Remove a Resource Control Attribute From a Project

To remove the resource control task.max-lwps in the project myproject, use the projmod command with the -r and -K options.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Remove the attribute task.max-lwps and all of its values from the project myproject:
    # projmod -r -K task.max-lwps myproject

How to Substitute Attributes and Attribute Values for Projects

To substitute a different value for the attribute task.max-lwps in the project myproject, use the projmod command with the -s and -K options. If the attribute does not exist, it is created.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Replace the current task.max-lwps values with the new values shown:
    # projmod -s -K "task.max-lwps=(priv,100,none),(priv,120,deny)" myproject

    The result would be:

    task.max-lwps=(priv,100,none),(priv,120,deny)

How to Remove the Existing Values for a Resource Control Attribute

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. To remove the current values for task.max-lwps from the project myproject, type:
    # projmod -s -K task.max-lwps myproject
Previous Next