我是武男, 24歲, 大家都叫我阿男...有的人還會叫我白目研究生...找我的話請Google "武男" 就沒錯了~

uBuntu Zone-OpenLDAP Server 速成 How To

Autor 白目研究生

參考資料:How-To set up a LDAP server and its clients

因緣際會之下,有需求裝LDAP SERVER

Lab Environment:

uBuntu Server 7.10

LdapAdmin

steps如下是:

安裝以下套件

# apt-get install slapd ldap-utils migrationtools

重新設定 slapd – OpenLDAP server (slapd)

# dpkg-reconfigure slapd

下面menuconfig請參考下面option

Omit OpenLDAP server configuration? … No
DNS domain name: havenlin.org
Name of your organization:Input your organization
Admin Password: XXXXX
Confirm Password: XXXXX
OK
BDB
Do you want your database to be removed when slapd is purged? … No
Move old database? … Yes
Allow LDAPv2 Protocol? … No

看一下有沒有什麼info 

# ldapsearch -x -b dc=havenlin,dc=org

如果連結LDAP Server有錯誤訊息

ldap_bind: Can’t contact LDAP server (-1)

請restart該process

# /etc/init.d/slapd start or restart

這樣子,算完成架設的動作了,不確定請用netstat -lantp確認

# netstat -lantp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:389             0.0.0.0:*               LISTEN     5263/slapd
tcp6       0      0 :::389                  :::*                    LISTEN     5263/slapd

過程中會在安裝LDAP的時候確認一次admin的密碼

reconfigure的時候會在確認一次

如果需要的話可以用CLI做參數與設定把資料匯入LDAP DB(我把LDAP當成一個驗證管理帳號的資料庫)

既然標題是速成的話,我選擇使用LdapAdmin這工具完成接下來的設定(按ldapadmin.exe下載)

建立連結

11.bmp

建立OU

2.bmp 

 建立user

3.bmp

設定user password

4.bmp

之後在編輯這個節點的時候,可以檢視密碼的資訊,當然是加密過後

5.bmp

到這邊

還沒有測試其LDAP其他應用性

因為可以搭配的服務太多了

所以,希望對有這部分需求的朋友有幫助

以上

Random Posts

請留言

CommentComment