Instalacão e configuracão inicial de um servidor LDAP
- Downloads através do yum:
ldap-admin-tool (lat)
ldap scripts
ldap-servers
ldap-clients
- Instalar o pacote do LDAP servidor:
yum install openldap-servers
- Para adicionar um repositório
vim /etc/yum.repos.d/CentOs-Base.repo
Altere de enabled=0 para enabled=1. Isto habilita o repositório
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
- Editar as configuracões do ldap:
vim /etc/openldap/ldap.conf
URI ldap://127.0.0.1/
BASE dc=grid,dc=unesp,dc=br
TLS_CACERTDIR /etc/openldap/cacerts
suffix grid.unesp.br
root dn=dc=grid, dc=unesp,dc=br
base dc=grid, dc=unesp,dc=br
yum install screen
ldappasswd
vim /etc/sysconfig/ldap
yum install openldap-clients
ldapsearch -x D "cn=Manager,dc=grid,dc=unesp,dc=br" -w h 200.136.803.148
O resultado deve ser semelhante a:
# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: (objectclass=*)
# requesting: D cn=Manager,dc=grid,dc=unesp,dc=br 200.136.803.148
#
# search result
search: 2
result: 32 No such object
matchedDN: dc=unesp,dc=br
# numResponses: 1
[root@localhost ~]#
vim /usr/share/openldap/migration/migrate_common.ph
# Default DNS domain $DEFAULT_MAIL_DOMAIN = "grid.unesp.br";
# Default base $DEFAULT_BASE = "dc=grid,dc=unesp,dc=br";
ldapinit
ldap setpasswd
vim /etc/nsswitch
Siga o exemplo abaixo
# Example:
#passwd: db files nisplus nis
#shadow: db files nisplus nis
#group: db files nisplus nis
passwd: files
shadow: files
group: files
- Para verificar usuários do LDAP na lista de passwd do /etc
getent passwd
--
AllanSzu - 26 Jan 2009