linux搭建ldap服務(wù)器詳細(xì)步驟
ldap這種原始的服務(wù)器搭建起來比較復(fù)雜,同時它也是CE必考的(客戶端的搭建)。
1、安裝openldap-servers軟件包
2、查看ldap模板文件的存放位置:
3、拷貝ldap模板文件到配置文件目錄并修改文件名為slapd.conf。
4、刪除/etc/openldap目錄下原有的文件,保留下這幾個文件,注意:以前學(xué)時是要刪除schema文件,直留下三個,但是我測試時如果刪除schema服務(wù)將失敗。
5、修改slapd.conf文件的權(quán)限:
6、修改sldap.conf配置文件:如下:(主要配好紅色的就ok,沒有的都是被注釋掉的)
include/etc/openldap/schema/corba.schema
include/etc/openldap/schema/core.schema
include/etc/openldap/schema/cosine.schema
include/etc/openldap/schema/duaconf.schema
include/etc/openldap/schema/dyngroup.schema
include/etc/openldap/schema/inetorgperson.schema
include/etc/openldap/schema/java.schema
include/etc/openldap/schema/misc.schema
include/etc/openldap/schema/nis.schema
include/etc/openldap/schema/openldap.schema
include/etc/openldap/schema/ppolicy.schema
include/etc/openldap/schema/collective.schema
allow bind_v2
pidfile/var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args
database bdb suffix "dc=example,dc=com" checkpoint1024 15 rootdn
"cn=Manager,dc=example,dc=com"
rootpw redhat
directory /var/lib/ldap
index objectClass eq,pres
index ou,cn,mail,surname,givennameeq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUideq,pres,sub
database monitor
access to *by dn.exact="cn=Manager,dc=example,dc=com" readby * none
7、重啟動ldap服務(wù)器:
8、創(chuàng)建ldap用戶目錄:
9、編輯一個自動創(chuàng)建ldap用戶的腳本:
10 、執(zhí)行此腳本添加用戶:
11、把ldap用戶,組分別導(dǎo)出來,到一個文件中:(例子只做了組)用戶在、/etc/passwd下
12、安裝軟件包:
13、去它的目錄下編譯ldap用戶組文件:
14、修改migrate_common.ph文件:
15、執(zhí)行./migrate_base.pl文件,并導(dǎo)出到一個目錄下邊,進(jìn)行進(jìn)行修改,只留下最基本的三個配置:
16,、分別使用./migrate_passwd.pl ./migrate_group.pl編譯我們已經(jīng)導(dǎo)出的ldap用戶和組文件: /mnt/user /mnt/group分別是從/etc/passwd /etc/group 導(dǎo)出的ldap用戶和組文件
/date/user.ldif /date/group.ldif 是編譯后生成的文件要以ldif結(jié)尾
17、看下/date下我們編譯好的幾個文件:
18、添加ldap用戶和組:
首先提示輸入密碼,其次添加成功。
還有個用戶,必須首先執(zhí)行base.ldif文件,它是最基本的配置。
版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。