linux+ldap安装目录,linux LDAP安装「建议收藏」

(113) 2023-06-12 11:12

Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说linux+ldap安装目录,linux LDAP安装「建议收藏」,希望能够帮助你!!!。

linux LDAP安装

LDAP(Lightweight Directory Access Protocol)是轻量目录

访问协议的缩写,其实是一种目录服务,类似于我们在文件

系统中所使用的目录,类似于我们所使用诸如NIS、DNS等网

络目录。 LDAP是一种特殊的数据库。LDAP对查询进行了优化

,适合读多写少的服务。

一、安装

yum install openldap openldap-servers

二、配置LDAP主配置文件/etc/openldap/slapd.conf

database        bdb                      #使用的资料

LDAP的dbs 保存的位置

库#

suffix          "dc=tony,dc=com"         #目录管理员#

rootdn          "cn=admin,dc=tony,dc=com"#根域名#

# Cleartext passwords, especially for the rootdn,

should

# be avoided.  See slappasswd(8) and slapd.conf(5)

for details.

# Use of strong authentication encouraged.

rootpw          123456                   #设置密码#

三、生成数据的模版/usr/share/openldap/migration

vim /usr/share/openldap/migration/migrate_common.ph

# Default DNS domain

$DEFAULT_MAIL_DOMAIN = "tony.com";

# Default base

$DEFAULT_BASE = "dc=tony,dc=com";

四、生成top domain ou

./migrate_base.pl > /tmp/tony.ldif

五、生成用户和组数据

先建立好用户和密码(分别建立了tony1,tony2,tony3)

grep tony /etc/passwd > /tmp/user

grep tony /etc/group > /tmp/group

./migrate_passwd.pl /tmp/user > /tmp/user.ldif

./migrate_group.pl /tmp/user > /tmp/group.ldif

六、导数据

/etc/init.d/ldap stop

cp /etc/openldap/DB_CONFIG.example

/var/lib/ldap/DB_CONFIG

chown ldap.ldap DB_CONFIG

slapadd -vl /tmp/tony.ldif

slapadd -vl /tmp/user.ldif

slapadd -vl /tmp/group.ldif

/etc/init.d/ldap start

七、实验ldap客户端

在系统-->管理-->验证

linux+ldap安装目录,linux LDAP安装「建议收藏」_https://bianchenghao6.com/blog__第1张

切换到tty下 su - tony1

[root@localhost ~]# su - tony1

su: warning: cannot change directory to /home/tony1: 没有那个文件或目录

-bash-3.2$

上一篇

已是最后文章

下一篇

已是最新文章

发表回复