title: adding custom attributes to openldap
body: <p>This is my first time at LDAP . I have setup an openldap on ubuntu machine and an ldap browser (phpldapadmin) on the remote system .I 'm trying to add two custom attributes to the cn=config   and i get a successful message but if i see the attributes or the schema in the ldap browser its no where visible , please let me know where i'm going wrong . Below are the steps i have taken   </p>
  
  <p>1)Creating custom.schema file </p>
  
  <pre><code>#file to add custom schemas to the ldap
  
  attributetype ( 1.7.11.1.1
          NAME 'studentid'
          DESC 'unique id given to each student of the college'
          EQUALITY caseIgnoreMatch
          SUBSTR caseIgnoreSubstringsMatch
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
          SINGLE-VALUE )
  
  attributetype ( 1.7.11.1.2
          NAME 'pexpiry'
          DESC 'indicated the date of password expiry'
          EQUALITY caseIgnoreMatch
          SUBSTR caseIgnoreSubstringsMatch
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
          SINGLE-VALUE )
  
  
  objectClass ( 1.7.11.1.1.100
      NAME 'Studentinfo'
          DESC 'Studentinfo object classes '
      SUP top
      AUXILIARY
          MUST  ( studentid $ pexpiry $
               )
          )
  </code></pre>
  
  <p>2)Create an ldif file </p>
  
  <pre><code>#ldif file containing the custom schema
  
  dn: cn=custom,cn=schema,cn=config
  objectClass: olcSchemaConfig
  cn: custom
  
  olcAttributeTypes: ( 1.7.11.1.1
          NAME 'studentid'
          DESC 'unique id given to each student of the college'
          EQUALITY caseIgnoreMatch
          SUBSTR caseIgnoreSubstringsMatch
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
          SINGLE-VALUE )
  
  olcAttributeTypes: ( 1.7.11.1.2
          NAME 'pexpiry'
          DESC 'indicated the date of password expiry'
          EQUALITY caseIgnoreMatch
          SUBSTR caseIgnoreSubstringsMatch
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
          SINGLE-VALUE )
  
  
  olcObjectClasses: ( 1.7.11.1.1.100
      NAME 'Studentinfo'
          DESC 'Studentinfo object class '
      SUP top
      AUXILIARY
          MUST  ( studentid $ pexpiry $
               )
          )
  </code></pre>
  
  <p>3)Add the ldif file to the cn=config using the below command </p>
  
  <pre><code>ldapadd -x -h 192.168.2.3 -D "cn=admin,cn=config" -W -f ./custom.ldif
  </code></pre>
  
  <p>It first asks for password , i enter the password and i get the message as </p>
  
  <pre><code>Adding entry  "cn=custom,cn=schema,cn=config"
  </code></pre>
  
  <p>But when i goto browser i don't see the schema nor the attributes there .I tried to add an user it said invalid attributes .</p>