
この質問は RedHat Enterprise Linux 7/8/9 および Ubuntu 22.04 に関するものですが、おそらくほとんどのディストリビューションに共通するものです。
私は 2 つのドメインを使用して、Active Directory と openldap ベースの LDAP サーバーの両方に対する認証に sssd を使用しています。
ユーザーは次のようにログインできます[メールアドレス]Active Directoryで認証するか、[メールアドレス]そして、openldap に対して認証します。ID 情報 (UID、Gecos、ホーム ディレクトリ) は、どちらの場合も openldap サーバーから取得されます。すべての関連ユーザーは両方のシステムに存在します (このように設定されている理由は長くなるため、ここではあまり関係ありません)。
ユーザーがどちらのドメインを使用するかに関係なく、Linux はそのログインを同じユーザーとして認識します。
ローカルの /etc/{password,shadow} に対して認証し、ネットワーク トラフィックをまったく使用せずに ID 情報を取得する新しい SSSD ドメイン (「local」という名前) を追加するという新しい要件が与えられました。/etc/password と /etc/shadow は正しく設定されます (この質問の範囲外です)。
ローカル ファイルを認証と識別ソースの両方として使用する sssd ドメインを作成する方法はありますか?
おそらく関係ないかもしれませんが、ここに 2 つの既存の SSSD ドメインがあります。
アクティブディレクトリ:
[domain/ad.mydomain.com]
auth_provider = krb5
id_provider = ldap
# We do not allow changing passwords
# chpass_provider = none
krb5_server = <redacted>
krb5_realm = AD.MYDOMAIN.COM
# Regardless of the auth provider, the id information always comes from
# LDAP.
ldap_schema = rfc2307
ldap_uri = ldaps://<redacted>/
ldap_search_base = ou=people,dc=mydomain,dc=com
ldap_group_member = memberuid
ldap_tls_reqcert = demand
ldap_tls_cacert = /etc/openldap/cacerts/<redacted>
ldap_default_bind_dn = <redacted>
ldap_default_authtok_type = password
ldap_default_authtok = <redacted>
ldap_user_ssh_public_key = sshPublicKey
entry_cache_timeout = 600
ldap_network_timeout = 3
cache_credentials = True
override_homedir = /home/%u
fallback_homedir = /home/%u
default_shell = /bin/bash
# Some performance tweaks. Without it, LDAP is painfully slow!
enumerate = false
ignore_group_members = true
オープンldap:
[domain/mydomain.com]
auth_provider = ldap
id_provider = ldap
# We do not allow changing passwords outside of USD_ONE
# chpass_provider = none
# Regardless of the auth provider, the id information always comes from
# LDAP.
ldap_schema = rfc2307
... Remainder is same as for Active Directory
私がやりたいのは、次のようなことです (これは実際には機能しません):
[domain/local]
auth_provider = files
id_provider = files # don't use LDAP for this domain
... other parameters
SSSD でローカル ファイルを使用する方法はありますか?