VineにLDAP認証でログインする

寝る前に今日やった作業をログに書き出しc⌒っ ´ρ`)φ
Windowsネットワーク用統合認証サーバー構築(OpenLDAP+Samba) - Fedoraで自宅サーバー構築
基本はここみながら

LDAPサーバのインストール

はいはいaptapt

LDAPサーバの設定

パスワードからハッシュを作成

# slappasswd -s パスワード -h {MD5}
{MD5}************************

ここで作成したハッシュを設定ファイルに記入

# vi /etc/openldap/slapd.conf
database ldbm
suffix "dc=prelude,dc=net"
rootdn "cn=Manager,dc=prelude,dc=net"
rootpw {MD5}************************

#追加
access to attrs=userPassword
by self write
by dn="cn=Manager,dc=prelude,dc=net" write
by anonymous auth
by * none

access to *
by dn="cn=Manager,dc=prelude,dc=net" write
by self write
by * read

実験用ネットワークなのでドメインとかは趣味
因みに、大文字も小文字も関係ないデス

LDAPクライアントの設定

# vi /etc/openldap/ldap.conf
BASE dc=prelude,dc=net

LDAPサーバに初期情報を登録

# vi /usr/share/openldap/migration/migrate_common.ph
$DEFAULT_BASE = "dc=prelude,dc=net";

ここだけ直したら
上記のURLを参考にざざっと登録

LDAP認証方式へ変更

いつもどおり/etc/nsswitch.confを編集してもいいんだけど

# authconfig

こんなのがあったのでこれで。

とまぁ

こんな感じでLDAP導入してやればNISはいらねーですよ。と
このまんまだとユーザの登録が激しく面倒なんだけどね
そこはsambaと連携することで何とかなる・・・のかな
sambaについてはまた後日