ldap_add: nenhum objeto (32) enquanto configura o ldap no centos 7?

0

Estou configurando o OpenLDAP no centos7 e parece encontrar um erro ao adicionar o primeiro usuário.

[root@web1 ~]# ldapadd -x -W -D "cn=Manager,dc=web1,dc=com" -f /root/rootuser.ldif
    Enter LDAP Password:
    adding new entry "uid=ldapuser,ou=People,dc=web1,dc=com"
    ldap_add: No such object (32)
            matched DN: dc=web1,dc=com

Eu adicionei o arquivo base.ldif com sucesso e preciso adicionar as pessoas & arquivos de grupo agora.

[root@web1 ~]# ldapadd -x -W -D "cn=Manager,dc=web1,dc=com" -f /root/base.ldif
Enter LDAP Password:
adding new entry "dc=web1,dc=com"
ldap_add: Already exists (68)

Arquivo base:

[root@web1 ~]# cat base.ldif
dn: dc=web1,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
o: web1 com
dc: web1

dn: cn=Manager,dc=web1,dc=com
objectClass: organizationalRole
cn: Manager
Description: Directory Manager

dn: ou=People,dc=web1,dc=com
objectClass: organizationalUnit
ou: People

dn: ou=Group,dc=web1,dc=com
objectClass: organizationalUnit
ou: Group

Rootuser.ldif

[root@web1 ~]# cat rootuser.ldif
dn: uid=ldapuser,ou=People,dc=web1,dc=com
uid: ldapuser
cn: ldapuser
sn: ldapuser
mail: [email protected]
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
userPassword: {crypt}$1$0ck/7MvX$VkTriVqcFOnsoIhF1TzTt1
shadowLastChange: 17223
shadowMin: 0
shadowMax: 99999
shadowWarning: 7
loginShell: /bin/bash
uidNumber: 1003
gidNumber: 1004
homeDirectory: /home/ldapuser

RootGroup.ldif

[root@web1 ~]# cat rootgroup.ldif
dn: cn=ldapuser,ou=Group,dc=web1,dc=com
objectClass: posixGroup
objectClass: top
cn: ldapuser
userPassword: {crypt}x
gidNumber: 1004

Resultados do Ldapsearch para dc

[root@web1 ~]# ldapsearch -hlocalhost -x -sbase | grep '^dn:'
dn: dc=web1,dc=com

Não consigo determinar o que está causando esse erro.

    
por Atul 26.02.2017 / 13:06

0 respostas