chlprsacl Command

Purpose

Changes the access controls for the least-privilege (LP) Resource Shared ACL.

Syntax

To add one or more accesses to the Resource Shared ACL or to overwrite the Resource Shared ACL with one or more accesses:

chlprsacl [ -a-n host1[,host2,… ] ] [-o] [-h] [-TV] ID_1 perm1 [ID_2 perm2] …

To add one or more accesses to the Resource Shared ACL or to overwrite the Resource Shared ACL with one or more accesses all using the same permissions:

chlprsacl [ -a-n host1[,host2,… ] ] -l [-o] [-h] [-TV] ID_1 [ID_2…] perm

To delete one or more accesses from the Resource Shared ACL:

chlprsacl [ -a-n host1[,host2,… ] ] -d [-h] [-TV] ID_1 [ID_2…]

To add accesses to (or remove accesses from) the Resource Shared ACL or to overwrite the Resource Shared ACL, with the accesses specified in a file:

chlprsacl [ -a-n host1[,host2,… ] ] [ -o-d ] -f file_name [-h] [-TV]

To set the Resource Shared ACL so that no permissions are allowed:

chlprsacl [ -a-n host1[,host2,… ] ] -x [-h] [-TV]

Description

The chlprsacl command changes the access control list (ACL) that is associated with the Resource Shared ACL. This command allows a user to be added to or removed from the Resource Shared ACL. This ACL:
  • is used to control accesses to LP resources when the Resource ACL indicates that it (the Resource Shared ACL) has control
  • can control access to one or more LP resources
  • can consist of ACL entries that define permissions to the LP resources
One Resource Shared ACL exists on each node for the IBM.LPCommands class.

The chlpracl command is used to indicate that the access to an LP resource is controlled by the Resource Shared ACL. The chlpriacl command is used to indicate that accesses to newly-created LP resources are controlled by the Resource Shared ACL, by modifying the Resource Initial ACL.

To add accesses to the Resource Shared ACL, specify the ID and the permission the ID is to have. More than one ID and permission pair can be specified. If you want to add multiple IDs and they will all have the same permission, use the -l flag to indicate that the format of the command is a list of IDs followed by a single permission that applies to all of the IDs. If you use the -o flag, the IDs and permissions specified with the command will overwrite the existing accesses. The previously-defined accesses in the ACL are deleted.

To delete accesses from the Resource Shared ACL, use the -d flag and specify the IDs to be deleted.

Use the -f flag to indicate that the accesses are specified in a file. Each line of the file will be an ID and permission for that ID. If the -d flag is used with the -f flag, only the ID is needed on each line. Everything after the first space is ignored.

This command runs on any node. If you want this command to run on all of the nodes in a domain, use the -a flag. If you want this command to run on a subset of nodes in a domain, use the -n flag. Otherwise, this command runs on the local node.

Flags

-a
Changes the Resource Shared ACLs on all nodes in the domain. The CT_MANAGEMENT_SCOPE environment variable's setting determines the cluster scope. If CT_MANAGEMENT_SCOPE is not set, the LP resource manager uses scope settings in this order:
  1. The management domain, if it exists
  2. The peer domain, if it exists
  3. Local scope
The chlprsacl command runs once for the first valid scope that the LP resource manager finds. For example, suppose a management domain and a peer domain exist and the CT_MANAGEMENT_SCOPE environment variable is not set. In this case, chlprsacl –a runs in the management domain. To run chlprsacl –a in the peer domain, you must set CT_MANAGEMENT_SCOPE to 2.
-d
Removes the ACL entry for the specified ID from the Resource Shared ACL.
-f file_name
Indicates that the accesses are specified in file_name. Each line of this file consists of an ID and the permission for that ID. If the -d flag is used with the -f flag, only the ID is needed on each line. Everything after the first space is ignored.
-l
Indicates that there is a list of IDs followed by a single permission that is used for all of the IDs.
-n host1[,host2,…]
Specifies the node in the domain on which the Resource Shared ACL should be changed. By default, the Resource Shared ACL is changed on the local node. This flag is valid only in a management domain or a peer domain. If CT_MANAGEMENT_SCOPE is not set, first the management domain scope is chosen if it exists, then the peer domain scope is chosen if it exists, and then local scope is chosen, until the scope is valid for the command. The command will run once for the first valid scope found.
-o
Indicates that the specified ACL entries overwrite any existing ACL entries for the Resource Shared ACL. Any ACL entries in the Resource Shared ACL are deleted.
-x
Sets the Resource Shared ACL to deny all accesses to the LP resources that use the Resource Shared ACL. Any ACL entries in the Resource Shared ACL are deleted.
-h
Writes the command's usage statement to standard output.
-T
Writes the command's trace messages to standard error.
-V
Writes the command's verbose messages to standard output.

Parameters

ID
Specifies the network identity of the user. If the same ID is listed more than once, the last permission specified is used. For a description of how to specify the network identity, see the lpacl information file.
perm
Specifies the permission allowed for ID. perm is specified as a string of one or more characters, where each character represents a particular permission. The valid values for perm are:
r
Read permission (consists of the q, l, e, and v permissions)
w
Write permission (consists of the d, c, s, and o permissions)
a
Administrator permission
x
Execute permission
q
Query permission
l
Enumerate permission
e
Event permission
v
Validate permission
d
Define and undefine permission
c
Refresh permission
s
Set permission
o
Online, offline, and reset permission
0
No permission
See the lpacl information file for a description of each permission and how it applies.

Security

To run the chlprsacl command, you need read and administrator permission in the Class ACL of the IBM.LPCommands resource class. Permissions are specified in the LP ACLs on the contacted system. See the lpacl information file for general information about LP ACLs and the RSCT: Administration Guide for information about modifying them.

Exit Status

0
The command has run successfully.
1
An error occurred with RMC.
2
An error occurred with the command-line interface (CLI) script.
3
An incorrect flag was specified on the command line.
4
An incorrect parameter was specified on the command line.
5
An error occurred with RMC that was based on incorrect command-line input.
6
The resource was not found.

Environment Variables

CT_CONTACT
Determines the system where the session with the resource monitoring and control (RMC) daemon occurs. When CT_CONTACT is set to a host name or IP address, the command contacts the RMC daemon on the specified host. If CT_CONTACT is not set, the command contacts the RMC daemon on the local system where the command is being run. The target of the RMC daemon session and the management scope determine the resource classes or resources that are processed.
CT_IP_AUTHENT
When the CT_IP_AUTHENT environment variable exists, the RMC daemon uses IP-based network authentication to contact the RMC daemon on the system that is specified by the IP address to which the CT_CONTACT environment variable is set. CT_IP_AUTHENT only has meaning if CT_CONTACT is set to an IP address; it does not rely on the domain name system (DNS) service.
CT_MANAGEMENT_SCOPE
Determines the management scope that is used for the session with the RMC daemon in processing the resources of the least-privilege (LP) resource manager. The management scope determines the set of possible target nodes where resources can be processed. The valid values are:
0
Specifies local scope.
1
Specifies local scope.
2
Specifies peer domain scope.
3
Specifies management domain scope.
If this environment variable is not set, local scope is used, unless the -a flag or the -n flag is specified.

Implementation Specifics

This command is part of the Reliable Scalable Cluster Technology (RSCT) fileset for AIX®.

Standard Output

When the -h flag is specified, this command's usage statement is written to standard output. When the -V flag is specified, this command's verbose messages are written to standard output.

Standard Error

All trace messages are written to standard error.

Examples

  1. To give user joe on nodeA execute permission in the Resource Shared ACL on nodeA, run one of these commands on nodeA:
    chlprsacl joe@NODEID  x
    
    chlprsacl joe@LOCALHOST  x 
  2. nodeA and nodeB are in a peer domain. To give user joe on nodeB execute permission to the Resource Shared ACL on nodeB, run this command on nodeA:
    chlprsacl -n nodeB joe@LOCALHOST  x
    In this example, specifying joe@NODEID instead of joe@LOCALHOST gives joe on nodeA execute permission to the Resource Shared ACL on nodeB.
  3. To give user joe on nodeA execute permission and bill on nodeA administrator permission and read permission to the Resource Shared ACL on nodeA, run this command on nodeA:
    chlprsacl joe@LOCALHOST  x  bill@LOCALHOST  ra	
  4. To give user joe on nodeA execute permission to the Resource Shared ACL on nodeA, overwriting the current ACLs so that this is the only access allowed, run this command on nodeA:
    chlprsacl -o joe@LOCALHOST x
  5. To give users joe, bill, and jane on nodeA read permission and write permission to the Resource Shared ACL on nodeA on nodeA, run this command on nodeA:
    chlprsacl -l joe@LOCALHOST  bill@LOCALHOST jane@LOCALHOST  rw
  6. To delete access for joe on nodeA from the Resource Shared ACL on nodeA, run this command on nodeA:
    chlprsacl -d  joe@LOCALHOST
  7. To add a list of accesses that are in a file named /mysecure/aclfile on nodeA to the Resource Shared ACL on nodeA, run this command on nodeA:
    chlprsacl -f /mysecure/aclfile 
    The contents of /mysecure/aclfile on nodeA could be:
    joe@LOCALHOST	  		x
    bill@LOCALHOST		 	rw
    jane@LOCALHOST		 	rwa
  8. To set the Resource Shared ACL on nodeA so that it denies all accesses for LP resources that use it on nodeA, run this command on nodeA:
    chlprsacl -x

Location

/opt/rsct/bin/chlprsacl
Contains the chlprsacl command