6: 2021-06-20 (日) 23:08:02 iseki |
現: 2021-06-29 (火) 11:12:15 iseki |
| ** pam_ldap [#hda84a02] | | ** pam_ldap [#hda84a02] |
- | - 認証で LDAP を使用するためのモジュール.(認証しかしない) | + | - 認証で [[LDAP]] を使用するためのモジュール.(認証しかしない) |
- | - https://github.com/PADL/pam_ldap | + | - ソース: https://github.com/PADL/pam_ldap |
| - see also [[OpenLDAP]], [[nss_ldap]] | | - see also [[OpenLDAP]], [[nss_ldap]] |
| #br | | #br |
| | | |
| *** config [#edc2684d] | | *** config [#edc2684d] |
- | - /etc/ldap.conf | + | - [[authconfig>authselect]], authconfig-uti コマンドでデフォルトの設定ファイルを用意してくくれる |
- | host 202.26.150.51 | + | -- CentOS8 では [[authselect]] になった. authconfig-uti は削除. |
- | base dc=nsl,dc=tuis,dc=ac,dc=jp | + | |
- | uri ldap://202.26.150.51/ | + | |
| | | |
- | binddn cn=**** | + | - 設定ファイルは /etc/ldap.conf と/etc/openldap/ldap.conf の両方を見ているみたい. |
- | bindpw **** | + | -- /etc/[[ldap.conf>LDAP/ldap.conf]] |
| + | -- /etc/openladp/ldap.conf |
| + | - /etc/pam.d/* |
| + | #br |
| | | |
| *** CentOS [#aa069f20] | | *** CentOS [#aa069f20] |
| -- したがって 設定ファイルは不必要. | | -- したがって 設定ファイルは不必要. |
| -- pam は認証しかしない.ユーザ情報の取得は NSSが行う -> 別々に設定するのは面倒なので,全部NSSに任せる... という理解でOK? | | -- pam は認証しかしない.ユーザ情報の取得は NSSが行う -> 別々に設定するのは面倒なので,全部NSSに任せる... という理解でOK? |
- | -- [[CentOS7]] で [[nslcd]] の挙動が変? (コンパイルした pam_ldapではちゃんと動く!) | + | -- [[CentOS7]] で [[nslcd]] の挙動が変? (コンパイルした pam_ldapではちゃんと動く!直接 LDAPサーバに見に行っている) |
| --- nslcd を最新版にしたが× (v0.9.11) | | --- nslcd を最新版にしたが× (v0.9.11) |
| + | #br |
| + | |
| + | *** [[PAM]] [#k9be6abb] |
| + | **** system-auth [#k4e96d42] |
| + | auth required pam_env.so |
| + | auth required pam_faildelay.so delay=2000000 |
| + | auth [default=1 ignore=ignore success=ok] pam_succeed_if.so uid >= 1000 quiet |
| + | auth [default=1 ignore=ignore success=ok] pam_localuser.so |
| + | auth sufficient pam_unix.so nullok try_first_pass |
| + | auth requisite pam_succeed_if.so uid >= 1000 quiet_success |
| + | auth sufficient pam_ldap.so use_first_pass |
| + | auth required pam_deny.so |
| + | |
| + | account required pam_unix.so broken_shadow |
| + | account sufficient pam_localuser.so |
| + | account sufficient pam_succeed_if.so uid < 1000 quiet |
| + | account [default=bad success=ok user_unknown=ignore] pam_ldap.so |
| + | account required pam_permit.so |
| + | |
| + | password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type= |
| + | password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok |
| + | password sufficient pam_ldap.so use_authtok |
| + | password required pam_deny.so |
| + | |
| + | session optional pam_keyinit.so revoke |
| + | session required pam_limits.so |
| + | -session optional pam_systemd.so |
| + | session optional pam_oddjob_mkhomedir.so umask=0077 |
| + | session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid |
| + | session required pam_unix.so |
| + | session optional pam_ldap.so |
| + | |
| + | - 必要なら(自分でpam_ldapをコンパイル・インストールしたら)pam_ldap.so を /lib/security/pam_ldap.so に書き換える |
| #br | | #br |
| | | |
| error opening connection to nslcd: %s | | error opening connection to nslcd: %s |
| nslcd password modify; user=%s | | nslcd password modify; user=%s |
| + | |
| # strings /lib64/security/pam_ldap.so |grep conf | | # strings /lib64/security/pam_ldap.so |grep conf |
| nslcd request config (%d) | | nslcd request config (%d) |