[Date Prev][Date Next] [Chronological] [Thread] [Top]

Defining new attributes and dumping schema help!



Hello,

I am using openldap ldap server.

I am trying to extend the inetPerson object class and create a new object class
named 'modemUser'. This user will say have one required object, 
modemMacAddress and another optional attribute 'downStreamBandwidth'.
What is the proper way to add new attributes and object classes to LDAP schema?


We have our own enterprise OID so I created following ldif file, to define
attributes.

dn: cn=schema
changetype: modify
add: attributetypes
attributetypes: ( 1.3.6.1.4.1.999.1000.1 NAME 'modemMacAddress' DESC 'MAC Address of the cable modem' SYNTAX '1.3.6.1.4.1.1466.115.121.1.15')

dn: cn=schema
changetype: modify
add: attributetypes
attributetypes: ( 1.3.6.1.4.1.999.1000.2 NAME 'downStreamBandwidth' DESC 'Downstream minimum bandwidth' SYNTAX '1.3.6.1.4.1.1466.115.121.1.27')


2. Now to define the new object class I created anothe .ldif file that 
   looks like this

dn: cn=schema
changetype: modify
add: objectclasses
objectclasses: (1.3.6.1.4.1.1456.1001.2 NAME 'modemUser' SUP 'inetOrgPerson' 
MUST (objectclass $ sn $ cn $ modemMacAddress ) MAY (downStreamBandwidth))

I loaded these things using ldapmodify, but problem is when I execute 
command, 
ldapsearch -h localhost -b "cn=schema" -w "secret" "objectclass=*"

Is there a command to dump the entire schema? Is the proper (and only) way
to add new attributes and objectclasses to openldap server?

I have included, my slapd.conf file in case that might help.

Thanks!

/Subodh Nijsure


# slapd.conf
include         /usr/local/etc/openldap/slapd.at.conf
include         /usr/local/etc/openldap/slapd.oc.conf
schemacheck     on
referral        ldap://localhost 

pidfile         /usr/local/var/slapd.pid
argsfile        /usr/local/var/slapd.args

#######################################################################
# ldbm database definitions
#######################################################################

database        ldbm
suffix          "o=somecompany,c=US"
directory       /usr/tmp
rootdn          "cn=admin, o=somecompany,c=US"
rootpw          secret