36.5. Using an ID view to override the login name of an IdM user on a specific host


Create an ID view for a specific IdM client that overrides a POSIX attribute value associated with a specific IdM user. The procedure uses the example of an ID view that enables an IdM user named idm_user to log in to an IdM client named client1 using the user_1234 login name.

Prerequisites

  • You are logged in as IdM administrator.

Procedure

  1. On the IdM server, create a new ID view. For example, to create an ID view named example_for_client1:

    $ ipa idview-add example_for_client1
    ---------------------------
    Added ID View "example_for_client1"
    ---------------------------
      ID View Name: example_for_client1
  2. Add a user override to the example_for_client1 ID view. To override the user login:

    • Enter the ipa idoverrideuser-add command
    • Add the name of the ID view
    • Add the user name, also called the anchor
    • Add the --login option:

      $ ipa idoverrideuser-add example_for_client1 idm_user --login=user_1234
      -----------------------------
      Added User ID override "idm_user"
      -----------------------------
        Anchor to override: idm_user
        User login: user_1234

      For a list of the available options, run ipa idoverrideuser-add --help.

      注記

      The ipa idoverrideuser-add --certificate command replaces all existing certificates for the account in the specified ID view. To append an additional certificate, use the ipa idoverrideuser-add-cert command instead:

      $ ipa idoverrideuser-add-cert example_for_client1 user --certificate="MIIEATCC..."
  3. Optional: Using the ipa idoverrideuser-mod command, you can specify new attribute values for an existing user override.
  4. Apply example_for_client1 to the client1.idm.example.com host:

    $ ipa idview-apply example_for_client1 --hosts=client1.idm.example.com
    -----------------------------
    Applied ID View "example_for_client1"
    -----------------------------
    hosts: client1.idm.example.com
    ---------------------------------------------
    Number of hosts the ID View was applied to: 1
    ---------------------------------------------
    注記

    The ipa idview-apply command also accepts the --hostgroups option. The option applies the ID view to hosts that belong to the specified host group, but does not associate the ID view with the host group itself. Instead, the --hostgroups option expands the members of the specified host group and applies the --hosts option individually to every one of them.

    This means that if a host is added to the host group in the future, the ID view does not apply to the new host.

  5. To apply the new configuration to the IdM client system immediately:

    1. SSH to the client system as root:

      $ ssh root@client1
      Password:
    2. On the IdM client, clear the SSSD cache:

      # sss_cache -E
    3. On the IdM client, restart the SSSD daemon:
    # systemctl restart sssd

Verification

  • If you have the credentials of user_1234, you can use them to log in to the IdM client:

    1. SSH to the client system using user_1234 as the login name:

      # ssh user_1234@client1.idm.example.com
      Password:
      
      Last login: Sun Jun 21 22:34:25 2020 from 192.168.122.229
      $
    2. On the client system, display the working directory:

      $ pwd
      /home/idm_user/
  • Alternatively, if you have root credentials on the IdM client, you can use them to check the output of the id command for idm_user and user_1234:

    # id idm_user
    uid=779800003(user_1234) gid=779800003(idm_user) groups=779800003(idm_user)
    # user_1234
    uid=779800003(user_1234) gid=779800003(idm_user) groups=779800003(idm_user)
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2026 Red Hat
トップに戻る