rhel6.5:ldap-server&client

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_34889607/article/details/81708162

test-env:

server

192.168.10.11

rhel65m

client

192.168.10.12

client

setenforce 0
sed -i '/^SELINUX=/cSELINUX=disabled' /etc/selinux/config
/etc/init.d/NetworkManager stop
chkconfig NetworkManager off
/etc/init.d/iptables stop
chkconfig iptables off
cat /etc/sysconfig/network
    NETWORKING=yes
    HOSTNAME=rhel65m

server-rhel6.5:

# 添加域名解析记录

vi /etc/hosts
    192.168.10.11    rhel65m
    192.168.10.12    client

yum install -y openldap openldap-servers openldap-clients openldap-devel migrationtools

slappasswd -s admin
    {SSHA}W+thx5t3BaoG8fcohM+edHSJb8MHDKxz

vim /etc/openldap/slapd.d/cn\=config/olcDatabase\=\{2\}bdb.ldif
    5    olcSuffix: dc=example,dc=com
    10  olcRootDN: cn=admin,dc=example,dc=com
    11  olcRootPW: {SSHA}W+thx5t3BaoG8fcohM+edHSJb8MHDKxz

vim /etc/openldap/slapd.d/cn\=config/olcDatabase\=\{1\}monitor.ldif
    4 olcAccess: {0}to *  by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=externa
    5  l,cn=auth" read  by dn.base="cn=admin,dc=example,dc=com" read  by * none

cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG
chown -R ldap.ldap /var/lib/ldap/

client:

systemctl stop NetworkManager
systemctl disable NetworkManager
systemctl stop firewalld
systemctl disable firewalld
setenforce 0
sed -i '/^SELINUX=/cSELINUX=disabled' /etc/selinux/config
hostnamectl set-hostname client
hostname client
bash

# 添加域名解析记录

vi /etc/hosts
    192.168.10.11    rhel65m
    192.168.10.12    client

猜你喜欢

转载自blog.csdn.net/qq_34889607/article/details/81708162