Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

openldap add mail attribute to users

Tags:

ldap

openldap

I'm trying to add 'mail' attribute to users on my openldap server but somehow it fails. I tried using ldapmodify but I get this:

ldap_modify: Object class violation (65)
additional info: attribute 'mail' not allowed

Here's how my schema looks like:

# LDIF Export for ou=users,dc=mydomain,dc=com
# Server:  (ldap.mydomain.com)
# Search Scope: sub
# Search Filter: (objectClass=*)
# Total Entries: 63

version: 1

# Entry 1: ou=users,dc=mydomain,dc=com
dn: ou=users,dc=mydomain,dc=com
objectclass: organizationalUnit
objectclass: top
ou: users

# Entry 2: uid=tom.hanks,ou=users,dc=mydomain,dc=com
dn: uid=tom.hanks,ou=users,dc=mydomain,dc=com
cn: tom.hanks
description: User account
gecos: tom.hanks
gidnumber: 100
homedirectory: /home/tom.hanks
loginshell: /bin/bash
objectclass: account
objectclass: posixAccount
uid: tom.hanks
uidnumber: 1005
userpassword: blahblah
like image 754
cparfon Avatar asked Feb 01 '15 11:02

cparfon


People also ask

What is object class in Ldif?

objectClass: person. Specifies the person object class. This object class specification should be included because many LDAP clients require it during search operations for a person or an organizational person. objectClass: organizationalPerson. Specifies the organizationalPerson object class.


1 Answers

Include objectclass: iNetOrgPerson to add the mail attribute.

like image 113
Dave Bennett Avatar answered Sep 28 '22 17:09

Dave Bennett