I am trying to add the following record stored in cwagon.ldif:
dn: uid=cwagon,ou=People,dc=network,dc=com
cn: Chuck Wagon
sn: Wagon
objectClass: top
objectClass: person
objectClass: posixAccount
objectClass: shadowAccount
userPassword: {crypt}6g8fRXiMEwg0Y
uid: cwagon
uidNumber: 500
gidNumber: 500
loginShell: /bin/bash
homeDirectory: /home/cwagon
shadowLastChange: 10877
shadowMin: 0
shadowMax: 999999
shadowInactive: -1
shadowWarning: 7
shadowFlag: 0
shadowExpire: -1
(This is indetical to an example on openldap.org, however the name and account have been changed to match my site)
Here is a dump of my diretory thus far:
# ldapsearch -x -b 'dc=network,dc=com' 'objectclass=*'
# extended LDIF # # LDAPv3 # base <dc=network,dc=com> with scope subtree # filter: objectclass=* # requesting: ALL #
# network.com dn: dc=network,dc=com dc: network objectClass: top objectClass: domain
# Hosts, network.com dn: ou=Hosts,dc=network,dc=com ou: Hosts objectClass: top objectClass: organizationalUnit
# Rpc, network.com dn: ou=Rpc,dc=network,dc=com ou: Rpc objectClass: top objectClass: organizationalUnit
# Services, network.com dn: ou=Services,dc=network,dc=com ou: Services objectClass: top objectClass: organizationalUnit
# netgroup.byuser, network.com dn: nisMapName=netgroup.byuser,dc=network,dc=com nisMapName: netgroup.byuser objectClass: top objectClass: nisMap
# Mounts, network.com dn: ou=Mounts,dc=network,dc=com ou: Mounts objectClass: top objectClass: organizationalUnit
# Networks, network.com dn: ou=Networks,dc=network,dc=com ou: Networks objectClass: top objectClass: organizationalUnit
# People, network.com dn: ou=People,dc=network,dc=com ou: People objectClass: top objectClass: organizationalUnit
# Group, network.com dn: ou=Group,dc=network,dc=com ou: Group objectClass: top objectClass: organizationalUnit
# Netgroup, network.com dn: ou=Netgroup,dc=network,dc=com ou: Netgroup objectClass: top objectClass: organizationalUnit
# Protocols, network.com dn: ou=Protocols,dc=network,dc=com ou: Protocols objectClass: top objectClass: organizationalUnit
# Aliases, network.com dn: ou=Aliases,dc=network,dc=com ou: Aliases objectClass: top objectClass: organizationalUnit
# netgroup.byhost, network.com dn: nisMapName=netgroup.byhost,dc=network,dc=com nisMapName: netgroup.byhost objectClass: top objectClass: nisMap
# search result search: 2 result: 0 Success
# numResponses: 14 # numEntries: 13
When I run this command it fails:
# ldapadd -W -x -D "cn=Manager,dc=network,dc=com" -W -f cwagon.ldif Enter LDAP Password: warning: no attributes to add (entry="uid=cwagon,ou=People,dc=network,dc=com") adding new entry "uid=cwagon,ou=People,dc=network,dc=com" ldap_add: Protocol error (2) additional info: no attributes provided
Here is my slapd.conf: include /etc/openldap/schema/core.schema include /etc/openldap/schema/cosine.schema include /etc/openldap/schema/inetorgperson.schema include /etc/openldap/schema/nis.schema
allow bind_v2
pidfile /var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args
database bdb suffix "dc=network,dc=com" rootdn "cn=Manager,dc=network,dc=com" rootpw secret rootpw {SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=
directory /var/lib/ldap
index objectClass eq,pres index ou,cn,mail,surname,givenname eq,pres,sub index uidNumber,gidNumber,loginShell eq,pres index uid,memberUid eq,pres,sub index nisMapName,nisMapEntry eq,pres,sub
Anyone have any ideas what I'm doing wrong? I've followed the docs on openldap.org and I'm trying to insert a record identical in format to the one listed in the docs. (only the text strings have been changed)
Thanks /CC