Debian 10 Buster
Sponsored Link

OpenLDAP : LDAPサーバーの設定2019/07/26

 
各サーバー間でユーザーのアカウント情報を共有できるように LDAP サーバーを構築します。
[1] OpenLDAP をインストールします。
root@dlp:~#
apt -y install slapd ldap-utils
# インストール中、LDAPサーバーの管理者パスワードの設定を求められる

 +--------------------------| Configuring slapd |-------------------------+
 | Please enter the password for the admin entry in your LDAP directory.  |
 |                                                                        |
 | Administrator password:                                                |
 |                                                                        |
 | ********______________________________________________________________ |
 |                                                                        |
 |                                 <Ok>                                   |
 |                                                                        |
 +------------------------------------------------------------------------+

# 設定確認

root@dlp:~#
slapcat

dn: dc=srv,dc=world
objectClass: top
objectClass: dcObject
objectClass: organization
o: srv.world
dc: srv
structuralObjectClass: organization
entryUUID: 08b3ae24-42fa-1039-8da0-ef6bf22a19f7
creatorsName: cn=admin,dc=srv,dc=world
createTimestamp: 20190725073200Z
entryCSN: 20190725073200.275709Z#000000#000#000000
modifiersName: cn=admin,dc=srv,dc=world
modifyTimestamp: 20190725073200Z

dn: cn=admin,dc=srv,dc=world
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword:: e1NTSEF9RG5yMWY1VGFnemc1WUlPMDJOQzY3dC9zbHVYZXhTZFo=
structuralObjectClass: organizationalRole
entryUUID: 08b9c85e-42fa-1039-8da1-ef6bf22a19f7
creatorsName: cn=admin,dc=srv,dc=world
createTimestamp: 20190725073200Z
entryCSN: 20190725073200.315769Z#000000#000#000000
modifiersName: cn=admin,dc=srv,dc=world
modifyTimestamp: 20190725073200Z
[2] ユーザーとグループ用の組織単位を新規登録しておきます。
root@dlp:~#
vi base.ldif
# 新規作成

# [dc=srv,dc=world] の箇所は自身の suffix に置き換え

dn: ou=people,dc=srv,dc=world
objectClass: organizationalUnit
ou: people

dn: ou=groups,dc=srv,dc=world
objectClass: organizationalUnit
ou: groups 

root@dlp:~#
ldapadd -x -D cn=admin,dc=srv,dc=world -W -f base.ldif

Enter LDAP Password:    
# 管理者パスワード(インストール中に設定したもの)

adding new entry "ou=people,dc=srv,dc=world"

adding new entry "ou=groups,dc=srv,dc=world"
関連コンテンツ