系統(tǒng)之家 - 系統(tǒng)光盤(pán)下載網(wǎng)站!

當(dāng)前位置:系統(tǒng)之家 > 系統(tǒng)教程 > Linux搭建ldap服務(wù)器

Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

時(shí)間:2014-12-23 15:17:04 作者:qipeng 來(lái)源:系統(tǒng)之家 1. 掃描二維碼隨時(shí)看資訊 2. 請(qǐng)使用手機(jī)瀏覽器訪(fǎng)問(wèn): https://m.xitongzhijia.net/xtjc/20141223/33236.html 手機(jī)查看 評(píng)論

  LDAP是輕量目標(biāo)訪(fǎng)問(wèn)協(xié)議,因?yàn)槠浯罱ú⒉缓?jiǎn)單,很多人想知道Linux下要如何搭建ldap服務(wù)器,今天小編就給大家詳細(xì)介紹下ldap服務(wù)器的搭建,感興趣的朋友不妨來(lái)了解下吧。

  1、安裝openldap-servers軟件包

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  2、查看ldap模板文件的存放位置:

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  3、拷貝ldap模板文件到配置文件目錄并修改文件名為slapd.conf。

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  4、刪除/etc/openldap目錄下原有的文件,保留下這幾個(gè)文件,注意:以前學(xué)時(shí)是要?jiǎng)h除schema文件,直留下三個(gè),但是我測(cè)試時(shí)如果刪除schema服務(wù)將失敗。

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  5、修改slapd.conf文件的權(quán)限:

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  6、修改sldap.conf配置文件:如下:(主要配好紅色的就ok,沒(méi)有的都是被注釋掉的)

  代碼如下:

  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” checkpoint 1024 15 rootdn

  “cn=Manager,dc=example,dc=com”

  rootpw redhat

  directory /var/lib/ldap

  index objectClass eq,pres

  index ou,cn,mail,surname,givenname eq,pres,sub

  index uidNumber,gidNumber,loginShell eq,pres

  index uid,memberUid eq,pres,sub

  database monitor

  access to * by dn.exact=“cn=Manager,dc=example,dc=com” read by * none

  7、重啟動(dòng)ldap服務(wù)器:

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  8、創(chuàng)建ldap用戶(hù)目錄:

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  9、編輯一個(gè)自動(dòng)創(chuàng)建ldap用戶(hù)的腳本:

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  10 、執(zhí)行此腳本添加用戶(hù):

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  11、把ldap用戶(hù),組分別導(dǎo)出來(lái),到一個(gè)文件中:(例子只做了組)用戶(hù)在、/etc/passwd下

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  12、安裝軟件包:

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  13、去它的目錄下編譯ldap用戶(hù)組文件:

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  14、修改migrate_common.ph文件:

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  15、執(zhí)行。/migrate_base.pl文件,并導(dǎo)出到一個(gè)目錄下邊,進(jìn)行進(jìn)行修改,只留下最基本的三個(gè)配置:

  16,、分別使用。/migrate_passwd.pl 。/migrate_group.pl編譯我們已經(jīng)導(dǎo)出的ldap用戶(hù)和組文件: /mnt/user /mnt/group分別是從/etc/passwd /etc/group 導(dǎo)出的ldap用戶(hù)和組文件

  /date/user.ldif /date/group.ldif 是編譯后生成的文件要以ldif結(jié)尾

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  17、看下/date下我們編譯好的幾個(gè)文件:

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  18、添加ldap用戶(hù)和組:

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  首先提示輸入密碼,其次添加成功。

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  還有個(gè)用戶(hù),必須首先執(zhí)行base.ldif文件,它是最基本的配置。

 Linux系統(tǒng)如何搭建搭建ldap服務(wù)器

  上面就是Linux下搭建ldap服務(wù)器的方法介紹了,本文從安裝到配置都有詳細(xì)的介紹,希望對(duì)你有所幫助,如果還想了解更多的Linux系統(tǒng)知識(shí),不妨關(guān)注下系統(tǒng)之家吧。

標(biāo)簽 ldap服務(wù)器

發(fā)表評(píng)論

0

沒(méi)有更多評(píng)論了

評(píng)論就這些咯,讓大家也知道你的獨(dú)特見(jiàn)解

立即評(píng)論

以上留言?xún)H代表用戶(hù)個(gè)人觀(guān)點(diǎn),不代表系統(tǒng)之家立場(chǎng)

其他版本軟件

熱門(mén)教程

人氣教程排行

Linux系統(tǒng)推薦

官方交流群 軟件收錄