LDAPサーバ - shima-jun/mywiki GitHub Wiki
LDAPサーバ
- 389DS設定
- LDAPクライアント(sssd)設定
389-Directory-Server
- インストール
- firewall
- インスタンス作成
- dscreate interactive(対話式)
- LDAP Browserで階層確認
- ユーザ、グループ作成
- 登録、パスワードリセット(変更)
1.インストール
[root@ms1 ~]# dnf module install 389-directory-server:stable/default
メタデータの期限切れの最終確認: 2:24:59 時間前の 2021年06月08日 13時58分33秒 に実施しました。
依存関係が解決しました。
=============================================================================
パッケージ Arch バージョン リポジトリー サイズ
=============================================================================
group/moduleパッケージをインストール:
389-ds-base x86_64 1.4.4.15-2.module_el8+12008+be90a417
epel-modular 1.8 M
cockpit-389-ds noarch 1.4.4.15-2.module_el8+12008+be90a417
epel-modular 2.0 M
依存関係のインストール:
389-ds-base-libs x86_64 1.4.4.15-2.module_el8+12008+be90a417
epel-modular 916 k
clevis x86_64 15-1.el8 appstream 56 k
cockpit x86_64 238.2-1.el8 baseos 75 k
cockpit-bridge x86_64 238.2-1.el8 baseos 534 k
cockpit-system noarch 238.2-1.el8 baseos 3.4 M
cockpit-ws x86_64 238.2-1.el8 baseos 1.3 M
cryptsetup x86_64 2.3.3-4.el8 baseos 189 k
cyrus-sasl-md5 x86_64 2.1.27-5.el8 baseos 65 k
cyrus-sasl-plain x86_64 2.1.27-5.el8 baseos 47 k
jose x86_64 10-2.el8 appstream 58 k
jq x86_64 1.5-12.el8 appstream 161 k
libjose x86_64 10-2.el8 appstream 64 k
libluksmeta x86_64 9-4.el8 appstream 26 k
luksmeta x86_64 9-4.el8 appstream 22 k
nss-tools x86_64 3.53.1-17.el8_3 appstream 559 k
oniguruma x86_64 6.8.2-2.el8 appstream 187 k
openldap-clients x86_64 2.4.46-16.el8 baseos 201 k
openssl-perl x86_64 1:1.1.1g-15.el8_3 baseos 79 k
perl-Algorithm-Diff noarch 1.1903-9.el8 baseos 51 k
perl-Archive-Tar noarch 2.30-1.el8 baseos 79 k
perl-Compress-Raw-Bzip2 x86_64 2.081-1.el8 baseos 40 k
perl-Compress-Raw-Zlib x86_64 2.081-1.el8 baseos 68 k
perl-DB_File x86_64 1.842-1.el8 appstream 83 k
perl-IO-Compress noarch 2.081-1.el8 baseos 258 k
perl-IO-Zlib noarch 1:1.10-419.el8 baseos 79 k
perl-Text-Diff noarch 1.45-2.el8 baseos 45 k
python3-argcomplete noarch 1.9.3-6.el8 appstream 60 k
python3-argparse-manpage noarch 1.5-1.el8 epel 29 k
python3-distro noarch 1.4.0-2.module_el8.3.0+6191+6b4b10ec
appstream 37 k
python3-ldap x86_64 3.3.1-1.el8 appstream 229 k
python3-lib389 noarch 1.4.4.15-2.module_el8+12008+be90a417
epel-modular 986 k
python3-lxml x86_64 4.2.3-2.el8 baseos 1.5 M
python3-psutil x86_64 5.4.3-10.el8 baseos 373 k
python3-ptyprocess noarch 0.5.2-4.el8 baseos 31 k
python3-pyasn1 noarch 0.3.7-6.el8 appstream 126 k
python3-pyasn1-modules noarch 0.3.7-6.el8 appstream 110 k
python3-pydbus noarch 0.6.0-5.el8 baseos 53 k
python3-webencodings noarch 0.5.1-6.el8 baseos 27 k
setroubleshoot-plugins noarch 3.3.13-1.el8 baseos 361 k
sos noarch 4.0-11.el8.alma baseos 687 k
tpm2-tools x86_64 4.1.1-2.el8 baseos 1.0 M
tracer-common noarch 0.7.5-2.el8 baseos 33 k
弱い依存関係のインストール:
bash-completion noarch 1:2.7-5.el8 baseos 273 k
clevis-luks x86_64 15-1.el8 appstream 36 k
cockpit-packagekit noarch 238.2-1.el8 baseos 648 k
cockpit-storaged noarch 238.2-1.el8 appstream 639 k
python3-beautifulsoup4 noarch 4.6.3-2.el8.1 epel 185 k
python3-cssselect noarch 0.9.2-10.el8 epel 40 k
python3-html5lib noarch 1:0.999999999-6.el8 baseos 214 k
python3-pexpect noarch 4.3.1-3.el8 baseos 138 k
python3-tracer noarch 0.7.5-2.el8 baseos 121 k
setroubleshoot-server x86_64 3.3.24-3.el8 baseos 400 k
udisks2-iscsi x86_64 2.9.0-6.el8 appstream 29 k
udisks2-lvm2 x86_64 2.9.0-6.el8 appstream 44 k
モジュールプロファイルのインストール中:
389-directory-server/default
モジュールストリームの有効化中:
389-directory-server stable
トランザクションの概要
=============================================================================
インストール 56 パッケージ
ダウンロードサイズの合計: 21 M
インストール後のサイズ: 60 M
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~省略~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
完了しました!
2.firewall
[root@ms2 ~]# firewall-cmd --add-service=ldap --permanent
success
[root@ms2 ~]# firewall-cmd --add-service=ldaps --permanent
success
[root@ms2 ~]# firewall-cmd --reload
success
4.インスタンス作成
[root@ms2 ~]# dscreate interactrive
usage: dscreate [-h] [-v] [-j] {from-file,interactive,create-template} ...
dscreate: error: invalid choice: 'interactrive' (choose from 'from-file', 'interactive', 'create-template')
[root@ms2 ~]# dscreate interactriveive
Install Directory Server (interactive mode)
===========================================
selinux is disabled, will not relabel ports or files.
Selinux support will be disabled, continue? [yes]: Enter
Enter system's hostname [www.example.jp]: Enter
Enter the instance name [ms2]: Enter
Enter port number [389]: Enter
Create self-signed certificate database [yes]: Enter
Enter secure port number [636]: Enter
Enter Directory Manager DN [cn=Directory Manager]: Enter
Enter the Directory Manager password: Password
Confirm the Directory Manager Password: Password
Enter the database suffix (or enter "none" to skip) [dc=www,dc=example,dc=jp]: dc=example ,dc=jp
Create sample entries in the suffix [no]: yes
Do you want to start the instance after the installation? [yes]:
Are you ready to install? [no]: yes
Starting installation...
Completed installation for ms2
インスタンス削除する方法
インスタンス名
[root@ms2 /]# /usr/sbin/dsctl -l
slapd-ms2 ←インスタンス名
削除
[root@ms2 ~]# dsctl インスタンス名 remove --do-it
Removing instance ...
Completed instance removal