如何搭建linux ldapweb管理界面

如何搭建linux ldapweb管理界面,第1张

1、安装openldap-servers软件包

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

3、拷贝ldap模板文件到配置文件目录并修改文件名为slapd.conf。

4、删除/etc/openldap目录下原有的文件,保留下这几个文件,注意:以前学时是要删除schema文件,直留下三个,但是我测试时如果删除schema服务将失败。

5、修改slapd.conf文件的权限:

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" 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、重启动ldap服务器:

8、创建ldap用户目录:

9、编辑一个自动创建ldap用户的脚本:

10 、执行此脚本添加用户:

11、把ldap用户,组分别导出来,到一个文件中:(例子只做了组)用户在、/etc/passwd下

12、安装软件包:

13、去它的目录下编译ldap用户组文件:

14、修改migrate_common.ph文件:

15、执行./migrate_base.pl文件,并导出到一个目录下边,进行进行修改,只留下最基本的三个配置:

16,、分别使用./migrate_passwd.pl ./migrate_group.pl编译我们已经导出的ldap用户和组文件: /mnt/user /mnt/group分别是从/etc/passwd /etc/group 导出的ldap用户和组文件

/date/user.ldif /date/group.ldif 是编译后生成的文件要以ldif结尾

17、看下/date下我们编译好的几个文件:

18、添加ldap用户和组:

首先提示输入密码,其次添加成功。

还有个用户,必须首先执行base.ldif文件,它是最基本的配置。

如果你的linux是各个发行版本中的一个,那么就不需要在添加了,他本来就有开机启动的服务,只需要打开就好。chkconfig --list ldap 或 chkconfig --list |grep ldap 应该就可以找到该服务,设置为开机启动 chkconfig ldap on


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/7375378.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-04
下一篇 2023-04-04

发表评论

登录后才能评论

评论列表(0条)

保存