이 콘텐츠는 선택한 언어로 제공되지 않습니다.

25.2. Defining Automembership Rules (Basic Procedure)


25.2.1. From the Web UI

  1. Open the Policy tab, and select the Automembers subtab.
  2. In the top of the Automembers area, select the type of autogroup to create, either USER GROUP RULES or HOST GROUP RULES.
  3. In the drop-down menu, select the group for which to create the automember rule.
  4. Click the Add and Edit button.
  5. In the edit page for the rule, click the + Add by the type of condition to create to identify entries.
  6. Select the attribute to use as the basis for the search and then set the regular expression to use to match the attribute value.
    Conditions can look for entries either to include in the group or to explicitly exclude from the group. The format of a condition is a Perl-compatible regular expression (PCRE). For more information on PCRE patterns, see the pcresyntax(3) man page.

    Note

    Exclude conditions are evaluated first and take precedence over include conditions.
  7. Click Add and Add Another to add another condition. A single rule can have multiple include and exclude conditions. When all conditions have been configured, click the Add button to save the last condition and close the dialog window.

25.2.2. From the CLI

There are two commands used to define an automember rule:
  • A command to target the group as an automember group, automember-add
  • A command to add regular expression conditions to identify group members, automember-add-condition
For example:
  1. Create the automember rule entry for the group. Use the --type to identify whether the target group is a user group (group) or a host group (hostgroup). This command has the format:
    ipa automember-add --type=group|hostgroup groupName
    For example:
    [jsmith@server ~]$ ipa automember-add --type=group exampleGroup
  2. Create the conditions for the rule. To set multiple patterns, either give a comma-separated list of patterns in the --inclusive-regex|--exclusive-regex options or run the command multiple times.
    This command has the format:
    ipa automember-add-condition --type=group|hostgroup --key=attribute --inclusive-regex=regex | --exclusive-regex=regex groupName
    As with the automember rule, the condition must specify the type of group (--type) and the name of the target group (groupName).
    The condition must also specify the attribute (the key) and any patterns for the attribute value. The --key is the attribute name that is the focus of the condition. Then, there is a regular expression pattern to identify matching values; matching entries can either be included (--inclusive-regex) or excluded (--exclusive-regex) from the group. Exclusion rules take precedence.
    For example, to include all employees with Barbara Jensen as a manager, but excluding the temporary employees:
    [jsmith@server ~]$ ipa automember-add-condition --type=group --key=manager --inclusive-regex=^uid=bjensen$ exampleGroup
    [jsmith@server ~]$ ipa automember-add-condition --type=group --key=employeetype --exclusive-regex=^temp exampleGroup

    Note

    The regular expression can match any part of the string. Using a caret (^) means that it must match at the beginning, and using a dollar sign ($) means that it must match at the end. Wrapping the pattern in ^ and $ means that the string as a whole must match.
    For more information on Perl-compatible regular expression (PCRE) patterns, see the pcresyntax(3) man page.
To remove a condition for a rule, pass the full condition information, both the key and the regular expression:
[jsmith@server ~]$ ipa automember-remove-condition --key=fqdn --type=hostgroup --inclusive-regex=^web[1-9]+\.example\.com webservers
To remove the entire rule, simply run the automember-del command.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.