Solaris WBEM Services Administrator's Guide

The Solaris_UserAcl Class

The Solaris_UserAcl class extends the Solaris_Acl base class, from which it inherits the string property capability with a default value r (read only).

You can set the capability property to any of the following values for access privileges.

 Access Right Description




Read and Write 




No access 

The Solaris_UserAcl class defines the following two key properties. Only one instance of the namespace-username ACL pair can exist in a namespace.

 Property Data Type Purpose



Identifies the namespace to which this ACL applies.  



Identifies the user to which this ACL applies. 

How to Set Access Control on a User
  1. Create an instance of the Solaris_UserAcl class. For example:

    /* Create a namespace object initialized with root\security
    (name of namespace) on the local host. */
    CIMNameSpace cns = new CIMNameSpace("", "root\security");
    // Connect to the root\security namespace as root. 
    cc = new CIMClient(cns, "root", "root_password");
    // Get the Solaris_UserAcl class 
    cimclass = cc.getClass(new CIMObjectPath("Solaris_UserAcl");
    // Create a new instance of the Solaris_UserAcl
    class ci = cimclass.newInstance(); ...

  2. Set the capability property to the desired access rights. For example:

    /* Change the access rights (capability) to read/write for user Guest 
    on objects in the root\molly namespace.*/
    ci.setProperty("capability", new CIMValue(new String("rw")); 
    ci.setProperty("nspace", new CIMValue(new String("root\molly")); 
    ci.setProperty("username", new CIMValue(new String("guest"));

  3. Update the instance. For example:

    // Pass the updated instance to the CIM Object Manager 
    cc.setInstance(new CIMObjectPath(), ci);