這篇文章主要介紹“openldap-2.4.44 安裝教程”,在日常操作中,相信很多人在openldap-2.4.44 安裝教程問題上存在疑惑,小編查閱了各式資料,整理出簡(jiǎn)單好用的操作方法,希望對(duì)大家解答”openldap-2.4.44 安裝教程”的疑惑有所幫助!接下來,請(qǐng)跟著小編一起來學(xué)習(xí)吧!
我們提供的服務(wù)有:成都網(wǎng)站建設(shè)、成都網(wǎng)站設(shè)計(jì)、微信公眾號(hào)開發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、汕頭ssl等。為超過千家企事業(yè)單位解決了網(wǎng)站和推廣的問題。提供周到的售前咨詢和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的汕頭網(wǎng)站制作公司
https://www.tutorialspoint.com/linux_admin/install_and_configure_open_ldap.htm
# 安裝openldap-clients/openldap-servers [root@openldap ldap]# yum install openldap-clients openldap-servers # 測(cè)試 [root@openldap ldap]# slaptest -u config file testing succeeded # 啟動(dòng) [root@openldap ldap]# service slapd start # 修改olcSuffix/olcRootDN/olcRootPW [root@openldap ldap]# slappasswd -s 123456 {SSHA}5AeSW/wI7nDvTcuPsRPitliGW7CfF8xV # # /etc/openldap/slapd.d/cn\=config/olcDatabase={2}hdb # [root@openldap ldap]# vi /opt/0_modify_olc_bash.ldif dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcSuffix olcSuffix: dc=harry,dc=com dn: olcDatabase = {2}hdb,cn=config changetype: modify replace: olcRootDN olcRootDN: cn=Manager,dc=harry,dc=com dn: olcDatabase = {2}hdb,cn=config changetype: modify replace: olcRootPW olcRootPW: {SSHA}5AeSW/wI7nDvTcuPsRPitliGW7CfF8xV #ldapmodify 修改 [root@openldap ldap]# ldapmodify -Y EXTERNAL -H ldapi:/// -f /opt/0_modify_olc_bash.ldif SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 modifying entry "olcDatabase={2}hdb,cn=config" modifying entry "olcDatabase = {2}hdb,cn=config" modifying entry "olcDatabase = {2}hdb,cn=config" #### setup db [root@openldap ldap]# cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG [root@openldap ldap]# chown ldap:ldap /var/lib/ldap/* #### 添加admin/ou [root@openldap ldap]# vi /opt/4_ldapadmin.ldif dn: cn=Manager,dc=harry,dc=com objectClass: organizationalRole cn: Manager dn: dc=harry,dc=com dc: harry objectClass: top objectClass: organization objectClass: dcObject o: harry dn: ou=Groups,dc=harry,dc=com ou: Groups objectClass: organizationalUnit dn: ou=Users,dc=harry,dc=com ou: Users objectClass: organizationalUnit [root@openldap ldap]# ldapadd -Y EXTERNAL -H ldapi:/// -f /opt/4_ldapadmin.ldif ### 搜索校驗(yàn) [root@openldap opt]# ldapsearch -b 'dc=harry,dc=com' -H ldapi:/// -LLL SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 dn: dc=harry,dc=com dc: harry objectClass: top objectClass: domain dn: ou=Groups,dc=harry,dc=com ou: Groups objectClass: organizationalUnit dn: ou=Users,dc=harry,dc=com ou: Users objectClass: organizationalUnit ### 修改monitor [root@openldap opt]# vi /opt/1_modify_monitor.ldif dn: olcDatabase={1}monitor,cn=config changetype: modify replace: olcAccess olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=extern al,cn=auth" read by dn.base="cn=Manager,dc=harry,dc=com" read by * none [root@openldap ldap]# ldapmodify -Y EXTERNAL -H ldapi:/// -f /opt/1_modify_monitor.ldif ######### 添加memberof # # 當(dāng)你添加group即objectClass 是groupOfUniqueNames時(shí)。添加屬性為uniqueMember記錄,會(huì)自動(dòng)為該用戶添加屬性memberOf # # [root@openldap opt]# vi /opt/2_add_memberof.ldif dn: cn=module,cn=config cn: module objectClass: olcModuleList olcModuleLoad: memberof olcModulePath: /usr/lib64/openldap [root@openldap opt]# vi /opt/3_add_memberof_config.ldif dn: olcOverlay=memberof,olcDatabase={2}hdb,cn=config objectClass: olcConfig objectClass: olcMemberOf objectClass: olcOverlayConfig objectClass: top olcOverlay: memberof olcMemberOfDangling: ignore olcMemberOfRefInt: TRUE olcMemberOfGroupOC: groupOfUniqueNames olcMemberOfMemberAD: uniqueMember olcMemberOfMemberOfAD: memberOf [root@openldap opt]# vi /opt/5_modify_refint.ldif dn: cn=module{0},cn=config add: olcmoduleload olcmoduleload: refint [root@openldap opt]# vi /opt/6_add_refint_config.ldif dn: olcOverlay=refint,olcDatabase={2}hdb,cn=config objectClass: olcConfig objectClass: olcOverlayConfig objectClass: olcRefintConfig objectClass: top olcOverlay: refint olcRefintAttribute: memberof uniqueMember manager owner ## 添加用戶 [root@openldap opt]# vi /opt/10_harrywu.ldif dn: cn=harrywu,ou=Users,dc=harry,dc=com objectClass: inetOrgPerson objectClass: posixAccount cn: harrywu uid: harrywu uidNumber: 1000 gidNumber: 1000 givenName: Harry sn: Wu homeDirectory: /home/harrywu loginShell: /bin/bash userPassword: 123456 ## 添加group => groupOfUniqueNames [root@openldap opt]# vi /opt/11_add_u_group1.ldif dn: cn=g1,ou=Groups,dc=harry,dc=com objectClass: groupOfUniqueNames cn: g1 uniqueMember: cn=harrywu,ou=Users,dc=harry,dc=com ## 校驗(yàn)cn=harrywu是否新增屬性memberOf [root@openldap opt]# ldapsearch -H ldapi:/// -b 'dc=harry,dc=com' dn memberof ... # harrywu, Users, harry.com dn: cn=harrywu,ou=Users,dc=harry,dc=com memberOf: cn=g1,ou=Groups,dc=harry,dc=com ...
到此,關(guān)于“openldap-2.4.44 安裝教程”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)砀鄬?shí)用的文章!
文章題目:openldap-2.4.44安裝教程
當(dāng)前鏈接:http://m.newbst.com/article42/gdidec.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站改版、App開發(fā)、網(wǎng)站導(dǎo)航、云服務(wù)器、網(wǎng)站排名、網(wǎng)站內(nèi)鏈
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)