Bug 498269 - ipa user-add objectclass violation if you define an email address
ipa user-add objectclass violation if you define an email address
Product: freeIPA
Classification: Community
Component: ipa-server (Show other bugs)
All Linux
high Severity high
: v2 release
: ---
Assigned To: Rob Crittenden
Chandrasekar Kannan
Depends On:
Blocks: 431020
  Show dependency treegraph
Reported: 2009-04-29 13:03 EDT by Jenny Galipeau
Modified: 2015-01-04 18:38 EST (History)
4 users (show)

See Also:
Fixed In Version: freeipa-2.0.0-1.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-03-27 03:14:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Use correct attribute for e-mail (785 bytes, patch)
2009-04-29 13:53 EDT, Rob Crittenden
no flags Details | Diff

  None (edit)
Description Jenny Galipeau 2009-04-29 13:03:52 EDT
Description of problem:

[root@jennyv2 /]# ipa user-add --first Jenny --last Galipeau --home /home/jenny/ --shell /bin/bash --principal jenny --email jgalipea@redhat.com --password Secret123
Enter password again to verify: 
ipa: ERROR: 'Object class violation':'attribute "mailaddress" not allowed'

"mailaddress" is not a defined attribute for at least objectclass inetorgperson.  It is "mail".

If you omit defining an email address it's okay because mail is not a required attribute.

[root@jennyv2 /]# ipa user-add --first Jenny --last Galipeau --home /home/jenny/ --shell /bin/bash --principal jenny --password Secret123password: 
Enter password again to verify: 
  dn: uid=secret123,cn=users,cn=accounts,dc=bos,dc=redhat,dc=com
  cn: Jenny Galipeau
  gecos: secret123
  gidnumber: 1002
  givenname: Jenny
  homedirectory: /home/jenny/
  krblastpwdchange: 20090429165258Z
  krbpasswordexpiration: 20090429165258Z
  krbprincipalname: jenny
  loginshell: /bin/bash
  objectclass: top
  objectclass: person
  objectclass: organizationalPerson
  objectclass: inetOrgPerson
  objectclass: inetUser
  objectclass: posixAccount
  objectclass: krbPrincipalAux
  objectclass: radiusprofile
  sn: Galipeau
  uid: secret123
  uidnumber: 1101
Added user "secret123"

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.  install ipa-server
2.  execute ipa user-add with --email defined.
Actual results:

Expected results:

Additional info:
Comment 1 Rob Crittenden 2009-04-29 13:53:18 EDT
Created attachment 341803 [details]
Use correct attribute for e-mail
Comment 2 Rob Crittenden 2009-04-29 13:53:38 EDT
master: 536b2150782d4d633e858567e4c1a4e266c6ef0c
Comment 4 Marc Sauton 2011-01-07 18:41:14 EST
seem to work ok, and seem to now use a different schema and mail attribute, with


ipa user-add --first=first2 --last=last2 --password --all --title sometitle2 --email=test@example.com
User login [flast2]: 
Enter Password again to verify: 
Added user "flast2"
  dn: uid=flast2,cn=users,cn=accounts,dc=example,dc=com
  User login: flast2
  First name: first2
  Last name: last2
  Full name: first2 last2
  Display name: first2 last2
  Initials: fl
  Home directory: /home/flast2
  GECOS field: flast2
  Login shell: /bin/sh
  Kerberos principal: flast2@EXAMPLE.COM
  Email address: test@example.com
  UID: 1005
  GID: 1005
  Job Title: sometitle2
  ipauniqueid: d10dacc2-1ab5-11e0-bd8d-5452001abd69
  krbpwdpolicyreference: cn=global_policy,cn=EXAMPLE.COM,cn=kerberos,dc=example,dc=com
  objectclass: top, person, organizationalperson, inetorgperson, inetuser, posixaccount, krbprincipalaux, krbticketpolicyaux, ipaobject

a ldapsearch returned:
dn: uid=flast4,cn=users,cn=accounts,dc=example,dc=com
mail: test@example.com
Comment 5 Jenny Galipeau 2011-06-10 15:12:02 EDT

# ipa user-add --first=Mickey --last=Mouse --email=mmouse@disney.world mmouse
Added user "mmouse"
  User login: mmouse
  First name: Mickey
  Last name: Mouse
  Full name: Mickey Mouse
  Display name: Mickey Mouse
  Initials: MM
  Home directory: /home/mmouse
  GECOS field: mmouse
  Login shell: /bin/sh
  Kerberos principal: mmouse@TESTRELM
  Email address: mmouse@disney.world
  UID: 754600008

:: [   LOG    ] :: ipa-user-cli-add-001: Add User

Added user "sup34"
  User login: sup34
  First name: Superuser
  Last name: crazylastnametoolong
  Full name: Superuser crazylastnametoolong
  Display name: Superuser crazylastnametoolong
  Initials: Sc
  Home directory: /home2/sup34
  GECOS field: whatsgecos?
  Login shell: /bin/sh
  Kerberos principal: sup34@SJC.REDHAT.COM
  Email address: sup34@really.cool.domain.co.uk.us.fi.com
  UID: 843400003
  Telephone Number: 9999999999
  Mobile Telephone Number: 1111111111
  Pager Number: 3333333333
  Fax Number: 4444444444
:: [   PASS   ] :: Adding user
ipa-user-cli-add-001 result: PASS
   metric: 0
   Log: /tmp/beakerlib-1457722/journal.txt
    Info: Searching AVC errors produced since 1300800069.61 (Tue Mar 22 09:21:09 2011)
     Searching logs...
     Info: No AVC messages found.
 Writing to /mnt/testarea/tmp.9yTn6S
   AvcLog: /mnt/testarea/tmp.9yTn6S

# rpm -qi ipa-server | head
Name        : ipa-server                   Relocations: (not relocatable)
Version     : 2.0.0                             Vendor: Red Hat, Inc.
Release     : 23.el6                        Build Date: Wed 20 Apr 2011 09:57:13 AM EDT
Install Date: Thu 19 May 2011 12:47:52 PM EDT      Build Host: x86-003.build.bos.redhat.com
Group       : System Environment/Base       Source RPM: ipa-2.0.0-23.el6.src.rpm
Size        : 2565882                          License: GPLv3+
Signature   : RSA/8, Thu 21 Apr 2011 03:48:25 PM EDT, Key ID 199e2f91fd431d51
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.freeipa.org/
Summary     : The IPA authentication server

Note You need to log in before you can comment on or make changes to this bug.