linux搭建ldap服务器详细步骤
2014-05-05 14:32
761 查看
ldap这种原始的服务器搭建起来比较复杂,同时它也是CE必考的(客户端的搭建)。
1、安装openldap-servers软件包
2、查看ldap模板文件的存放位置:
3、拷贝ldap模板文件到配置文件目录并修改文件名为slapd.conf。
4、删除/etc/openldap目录下原有的文件,保留下这几个文件,注意:以前学时是要删除schema文件,直留下三个,但是我测试时如果删除schema服务将失败。
5、修改slapd.conf文件的权限:
6、修改sldap.conf配置文件:如下:(主要配好红色的就ok,没有的都是被注释掉的)
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文件,它是最基本的配置。
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 * none7、重启动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上安装搭建Nginx服务器的详细步骤
- 在Linux系统下搭建Samba共享服务器的详细步骤
- 在Linux系统上安装Solr服务器的详细步骤.
- 如何在Linux下部署web程序(搭建vsftp服务,搭建sshd 服务器,jdk安装步骤,Tomcat安装步骤,MySQL安装步骤)
- 在Linux下搭建Git服务器步骤
- 在CentOS搭建Git服务器的详细步骤
- Linux mail服务器搭建步骤
- CentOS服务器上搭建Gitlab安装步骤、中文汉化详细步骤、日常管理以及异常故障排查
- Linux搭建TortoiseSVN服务器安装步骤及配置
- [置顶] 阿里云ECS服务器搭建Nginx+PHP+MySql+Redis环境详细步骤(CentOS7环境)
- CentOS服务器上搭建Gitlab安装步骤、中文汉化详细步骤、日常管理以及异常故障排查
- (一) Linux Centos7下SVN服务器搭建详细教程
- linux服务器搭建 NAT和DHCP超详细
- [linux]邮件服务器的搭建-详细步骤
- CentOS服务器上搭建Gitlab安装步骤、中文汉化详细步骤、日常管理以及异常故障排查
- Linux下搭建Hadoop详细步骤
- 搭建安全Linux系统的详细步骤介绍
- 利用apache2+gitolite+gitweb搭建git服务器的详细步骤
- linux下svn服务器搭建步骤
- 如何搭建SVN服务器,详细安装步骤。