









hbacrule-* commands (listed in Table 14.1, “Host-Based Access Control Command and Options”). The first step is to create a container entry; from there, users, hosts, and services can be added to the access control entry.
$ ipa hbacrule-add* options ruleName--usercat=all.
$ ipa hbacrule-add --usercat=all --srchostcat=all allGroup -------------------------- Added HBAC rule "allGroup" -------------------------- Rule name: allGroup User category: all Source host category: all Enabled: TRUE
hbacrule-add-host command:
$ ipa hbacrule-add-host --hosts=server.example.com allGroup
Rule name: allGroup
User category: all
Source host category: all
Enabled: TRUE
Successful hosts/hostgroups:
member host: server.example.com
-------------------------
Number of members added 1
-------------------------
$ ipa hbacrule-add --hostcat=all --srchostcat=all sshd-jsmith
hbacrule-add-user command:
$ ipa hbacrule-add-user --users=jsmith sshd-jsmith
hbacsvc-add command.) This is the service that the user can use to connect to the machine.
$ ipa hbacrule-add-service --hbacsvcs=sshd sshd-jsmith
hbacrule-add-service command, only with the --hbacsvcgroups option that specifies the group name.
$ ipa hbacrule-add-service --hbacsvcgroups=login loginRule
| Command | Description | Arguments | Source or Target Entry |
|---|---|---|---|
| hbacrule-add | Adds a new host-based access control rule. |
| |
| hbacrule-add-host | Adds a target host to the access control rule. A target host can be accessed by other servers and users in the domain. |
| Target |
| hbacrule-add-service | Adds a service type to the rule. |
| Target |
| hbacrule-add-sourcehost | Adds a server to the list of servers that can be used to access domain services and target servers. |
| Source |
| hbacrule-add-user | Adds a user to the access control rule. The user is then able to access any allowed target host or service within the domain, from any configured source host. |
| Source |
| hbacrule-disable | hbacrule-enable | Disables or enables a host-based access control rule. Rules can be disabled if their behavior needs to be evaluated (for troubleshooting or to test a new rule). | ruleName, which is the rule to disable or enable |