GNU/Linux >> Linux の 問題 >  >> Fedora

Fedora35にFreeIPAクライアントをインストールする方法

この統合により、システム管理者はFreeIPAサーバー上でサーバーを一元的に便利に構成できます。クライアントマシンで管理コマンドが実行されると、FreeIPAクライアントはそれをサーバーに送信して実行します。

関連コンテンツ

  • FreeIPAサーバーでユーザーとグループを管理する方法
  • Rocky Linux / Alma Linux /CentOS8にFreeIPAクライアントをインストールする方法
  • Rocky Linux /Centos8にFreeIPAをインストールして構成する方法
  • Ubuntu20.04にFreeIPAクライアントをインストールして構成する方法
  • Rocky Linux / Alma Linux /Centos8でFreeIPAレプリケーションを構成する方法

前提条件

フォローするには、次のものがあることを確認してください

  • 更新されたFedora35サーバー/ワークステーション
  • クライアントが参加するIPAサーバー
  • サーバーまたはsudoアクセス権を持つユーザーへのsudoアクセス
  • サーバーからのインターネットアクセス

目次

  1. FreeIPAパッケージのインストール
  2. クライアントの設定
  3. 最初のログインでホームディレクトリの作成を有効にする
  4. クライアントの追加をテストする
  5. FreeIPAipaコマンドライン管理ツールの使用
  6. 秘密鍵を使用してパスワードなしの認証を有効にする
  7. Rocky Linux / AlmaLinuxIPAクライアントの削除

1。 FreeIPAパッケージのインストール

Fedora 35サーバー/ワークステーションでは、FreeIPAクライアントはデフォルトのリポジトリで freeipa-clientとして利用できます。 。次のコマンドを使用して検索します:

sudo dnf search freeipa-client

このコマンドを使用してFreeIPAクライアントパッケージをインストールします。

sudo dnf -y install freeipa-client

rpm -qiを使用してクライアントの追加を確認します コマンド

$ rpm -qi freeipa-client
Name        : freeipa-client
Version     : 4.9.7
Release     : 2.fc35
Architecture: x86_64
Install Date: Sat 13 Nov 2021 08:22:50 AM UTC
Group       : Unspecified
Size        : 242563
License     : GPLv3+
Signature   : RSA/SHA256, Fri 15 Oct 2021 07:13:26 PM UTC, Key ID db4639719867c58f
Source RPM  : freeipa-4.9.7-2.fc35.src.rpm
Build Date  : Fri 15 Oct 2021 06:59:37 PM UTC
Build Host  : buildvm-x86-25.iad2.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://www.freeipa.org/
Bug URL     : https://bugz.fedoraproject.org/freeipa
Summary     : IPA authentication for use on clients
Description :
IPA is an integrated solution to provide centrally managed Identity (users,
hosts, services), Authentication (SSO, 2FA), and Authorization
(host access control, SELinux user roles, services). The solution provides
features for further integration with Linux based clients (SUDO, automount)
and integration with Active Directory based infrastructures (Trusts).
If your network uses IPA for authentication, this package should be
installed on every client machine.
This package provides command-line tools for IPA administrators.

2。クライアントの設定

FreeIPAクライアントパッケージのインストールが完了したら。 IPAサーバーのホスト名とIPアドレスを/etc / hostsに追加します DNS解決が機能していない場合は、ファイルを作成してください。

echo "10.2.40.149 ipa.citizix.com" | sudo tee /etc/hosts

システムのホスト名を設定します。

sudo hostnamectl set-hostname fedora-client.citizix.com

次に、FreeIPAサーバーとドメイン名を指定してクライアントをセットアップできます

sudo ipa-client-install --server=ipa.citizix.com --domain ipa.citizix.com

この例のように、ipaクライアントのホスト名、サーバー、ドメイン、およびレルムを指定する引数をさらに追加することもできます。

sudo ipa-client-install --hostname=fedora-client.citizix.com \
 --mkhomedir \
 --server=ipa.citizix.com \
 --domain ipa.citizix.com \
 --realm IPA.CITIZIX.COM

これが私の出力です。これに似たものが表示されるはずです

$ sudo ipa-client-install --server=ipa.citizix.com --domain ipa.citizix.com
This program will set up IPA client.
Version 4.9.7

Autodiscovery of servers for failover cannot work with this configuration.
If you proceed with the installation, services will be configured to always access the discovered server for all operations and will not fail over to other servers in case of failure.
Proceed with fixed values and no DNS discovery? [no]: yes
Do you want to configure chrony with NTP server or pool address? [no]: no
Client hostname: fedora-client.citizix.com
Realm: IPA.CITIZIX.COM
DNS Domain: ipa.citizix.com
IPA Server: ipa.citizix.com
BaseDN: dc=ipa,dc=citizix,dc=com

Continue to configure the system with these values? [no]: yes
Synchronizing time
No SRV records of NTP servers found and no NTP server or pool address was provided.
Using default chrony configuration.
Attempting to sync time with chronyc.
Time synchronization was successful.
User authorized to enroll computers: admin
Password for [email protected]:
Successfully retrieved CA cert
    Subject:     CN=Certificate Authority,O=IPA.CITIZIX.COM
    Issuer:      CN=Certificate Authority,O=IPA.CITIZIX.COM
    Valid From:  2021-11-09 05:42:01
    Valid Until: 2041-11-09 05:42:01

Enrolled in IPA realm IPA.CITIZIX.COM
Created /etc/ipa/default.conf
Configured sudoers in /etc/authselect/user-nsswitch.conf
Configured /etc/sssd/sssd.conf
Configured /etc/krb5.conf for IPA realm IPA.CITIZIX.COM
Systemwide CA database updated.
Hostname (fedora-client.citizix.com) does not have A/AAAA record.
Failed to update DNS records.
Missing A/AAAA record(s) for host fedora-client.citizix.com: 10.2.40.174.
Incorrect reverse record(s):
10.2.40.174 is pointing to ip-10-2-40-174.us-west-2.compute.internal. instead of fedora-client.citizix.com.
Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub
Adding SSH public key from /etc/ssh/ssh_host_dsa_key.pub
Adding SSH public key from /etc/ssh/ssh_host_ecdsa_key.pub
Adding SSH public key from /etc/ssh/ssh_host_ed25519_key.pub
Could not update DNS SSHFP records.
SSSD enabled
Configured /etc/openldap/ldap.conf
Configured /etc/ssh/ssh_config
Configured /etc/ssh/sshd_config.d/04-ipa.conf
Configuring ipa.citizix.com as NIS domain.
Client configuration complete.
The ipa-client-install command was successful

3。最初のログインでホームディレクトリの作成を有効にする

ユーザーのホームディレクトリが自動的に作成されない場合は、以下のコマンドを実行してこの機能を有効にします。これにより、最初のログイン時にホームディレクトリが作成されます。

$ sudo authselect enable-feature with-mkhomedir
Make sure that SSSD service is configured and enabled. See SSSD documentation for more information.

- with-mkhomedir is selected, make sure pam_oddjob_mkhomedir module
  is present and oddjobd service is enabled and active
  - systemctl enable --now oddjobd.service

$ sudo systemctl enable --now oddjobd
Created symlink /etc/systemd/system/multi-user.target.wants/oddjobd.service → /usr/lib/systemd/system/oddjobd.service.

4。クライアントの追加をテストする

クライアントが正常に追加されたことをテストするには、freeipaのユーザーでログインします。初めてログインする場合は、パスワード変更のプロンプトが表示されます。そうでない場合は、次のように表示されます。

$ ssh [email protected]
([email protected]) Password:
Last login: Sat Nov 13 08:29:12 2021 from 10.2.40.174

[[email protected] ~]$

5。 FreeIPAipaコマンドライン管理ツールの使用

ipaコマンドラインツールを使用して、クライアントマシンからFreeIPAサーバーを管理できます。

まず、Kerberosチケットを取得します。

$ kinit admin
Password for [email protected]:

klistを使用してチケットの有効期限情報を確認してください。

$ klist
Ticket cache: KCM:1000
Default principal: [email protected]

Valid starting       Expires              Service principal
11/12/2021 21:27:59  11/13/2021 21:27:47  krbtgt/[email protected]

ユーザーアカウントを追加し、存在するアカウントを一覧表示してテストします:

$ sudo ipa user-add kip \
     --first=Kipkoech \
     --last=Towett \
     [email protected] \
     --password

Password:
Enter Password again to verify:
----------------
Added user "kip"
----------------
  User login: kip
  First name: Kipkoech
  Last name: Towett
  Full name: Kipkoech Towett
  Display name: Kipkoech Towett
  Initials: KT
  Home directory: /home/kip
  GECOS: Kipkoech Towett
  Login shell: /bin/bash
  Principal name: [email protected]
  Principal alias: [email protected]
  User password expiration: 20211112183007Z
  Email address: [email protected]
  UID: 1063800003
  GID: 1063800003
  Password: True
  Member of groups: ipausers
  Kerberos keys available: True

確認します。

$ ipa user-find kip
--------------
1 user matched
--------------
  User login: kip
  First name: Kipkoech
  Last name: Towett
  Home directory: /home/kip
  Login shell: /bin/bash
  Principal name: [email protected]
  Principal alias: [email protected]
  Email address: [email protected]
  UID: 1063800003
  GID: 1063800003
  Account disabled: False
----------------------------
Number of entries returned 1
----------------------------

6。秘密鍵を使用してパスワードなしの認証を有効にする

パスワードなしでサーバーへの認証を行う場合は、公開鍵をFreeIPAサーバーにコピーします。ユーザープロファイルで、[追加]をクリックします 「SSH公開鍵」の下のボタン 「、公開鍵をボックスに貼り付けて保存します。

7。 Fedora35IPAクライアントの削除

Rocky Linux / Alma Linux 8でのFreeIPAクライアントの削除は、次のコマンドを実行することで実行できます:

$ sudo ipa-client-install  --uninstall

結論

このガイドでは、Fedora35にFreeIPAクライアントをインストールしてセットアップすることができました。


Fedora
  1. Node.jsをFedora35/Fedora34にインストールする方法

  2. Fedora35にJava17をインストールする方法

  3. Fedora35にNotepad++をインストールする方法

  1. CentOS7にFreeIPAクライアントをインストールする方法

  2. Ubuntuサーバー18.04にFreeIPAクライアントをインストールする方法

  3. Fedora35にWiresharkをインストールする方法

  1. Fedora34にVagrantをインストールする方法

  2. OpenOffice4.1.10をFedora34にインストールする方法

  3. AnyDeskをFedora35/Fedora34にインストールする方法