Questo contenuto non è disponibile nella lingua selezionata.
3.3. Setting User Permissions
By default, the root user and any user who is a member of the group
haclient has full read/write access to the cluster configuration. As of Red Hat Enterprise Linux 6.6, you can use the pcs acl command to set permission for local users to allow read-only or read-write access to the cluster configuration by using access control lists (ACLs).
Setting permissions for local users is a two-step process:
- Execute the
pcs acl role create...command to create a role which defines the permissions for that role. - Assign the role you created to a user with the
pcs acl user createcommand.
The following example procedure provides read-only access for a cluster configuration to a local user named
rouser.
- This procedure requires that the user
rouserexists on the local system and that the userrouseris a member of the grouphaclient.adduser rouser usermod -a -G haclient rouser
# adduser rouser # usermod -a -G haclient rouserCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Enable Pacemaker ACLs with the
enable-aclcluster property.pcs property set enable-acl=true --force
# pcs property set enable-acl=true --forceCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a role named
read-onlywith read-only permissions for the cib.pcs acl role create read-only description="Read access to cluster" read xpath /cib
# pcs acl role create read-only description="Read access to cluster" read xpath /cibCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the user
rouserin the pcs ACL system and assign that user theread-onlyrole.pcs acl user create rouser read-only
# pcs acl user create rouser read-onlyCopy to Clipboard Copied! Toggle word wrap Toggle overflow - View the current ACLs.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The following example procedure provides write access for a cluster configuration to a local user named
wuser.
- This procedure requires that the user
wuserexists on the local system and that the userwuseris a member of the grouphaclient.adduser wuser usermod -a -G haclient wuser
# adduser wuser # usermod -a -G haclient wuserCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Enable Pacemaker ACLs with the
enable-aclcluster property.pcs property set enable-acl=true --force
# pcs property set enable-acl=true --forceCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a role named
write-accesswith write permissions for the cib.pcs acl role create write-access description="Full access" write xpath /cib
# pcs acl role create write-access description="Full access" write xpath /cibCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create the user
wuserin the pcs ACL system and assign that user thewrite-accessrole.pcs acl user create wuser write-access
# pcs acl user create wuser write-accessCopy to Clipboard Copied! Toggle word wrap Toggle overflow - View the current ACLs.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
For further information about cluster ACLs, see the help screen for the
pcs acl command.