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
  • Instalacão do client

yum install openldap-clients
  • Para localizar a tabela:
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 ~]# 
  • Editar:

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";


  • Para iniciar o ldap
ldapinit

ldap setpasswd 
  • Edite o arquivo:
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

Topic revision: r2 - 2009-01-27 - AllanSzu
 

This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback

antalya escort bursa escort eskisehir escort istanbul escort izmir escort