1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

OpenLDAPのデータ移行手順

Last updated at Posted at 2019-12-28

移行元のLDIF作成

以下コマンドでldifを取得

slapcat -l <任意の場所とファイル名>

例)
slapcat -l /tmp/ikou.ldif

移行先でLDIFのインポート

サービスの停止

systemctl stop slapd

データベースの削除

cd /var/lib
rm -rf ./ldap/*

LDIFファイルのインポート

slapadd -l

例)
slapadd -l /tmp/ikou.ldif

所有者の変更

chown ldap:ldap -R /etc/openldap/slapd.d
chown ldap:ldap -R /var/lib/ldap

サービスの起動

systemctl start slapd

うまく接続できないときは

rootDNのパスワードを再設定してみる

slappasswdコマンドを実行し、任意のパスワードを設定

{SSHA}<ハッシュ値>
がでてくるので、コピーして

slapd.confの該当箇所に張り付け

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?