Bug 692945 - postalcode for user not being added correctly with ipa user-add or user-mod
Summary: postalcode for user not being added correctly with ipa user-add or user-mod
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-01 18:47 UTC by Jenny Severance
Modified: 2015-01-21 20:14 UTC (History)
2 users (show)

Fixed In Version: ipa-2.0.0-20.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 13:44:50 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0631 0 normal SHIPPED_LIVE new package: ipa 2011-05-18 17:55:55 UTC

Description Jenny Severance 2011-04-01 18:47:54 UTC
Description of problem:

# ipa user-add --first=test --last=test --postalcode=01730 test
-----------------
Added user "test"
-----------------
  User login: test
  First name: test
  Last name: test
  Full name: test test
  Display name: test test
  Initials: tt
  Home directory: /home/test
  GECOS field: test
  Login shell: /bin/sh
  Kerberos principal: test@TESTRELM
  UID: 684200063
  ZIP: 984


ldapsearch:

# test, users, accounts, testrelm
dn: uid=test,cn=users,cn=accounts,dc=testrelm
displayName: test test
cn: test test
objectClass: top
objectClass: person
objectClass: organizationalperson
objectClass: inetorgperson
objectClass: inetuser
objectClass: posixaccount
objectClass: krbprincipalaux
objectClass: krbticketpolicyaux
objectClass: ipaobject
objectClass: mepOriginEntry
loginShell: /bin/sh
sn: test
postalCode: 984
gecos: test
homeDirectory: /home/test
krbPwdPolicyReference: cn=global_policy,cn=TESTRELM,cn=kerberos,dc=testrelm
krbPrincipalName: test@TESTRELM
givenName: test
uid: test
initials: tt
uidNumber: 684200063
gidNumber: 684200063
ipaUniqueID: fcadb392-5c8f-11e0-a286-5254002c918f
mepManagedEntry: cn=test,cn=groups,cn=accounts,dc=testrelm
memberOf: cn=ipausers,cn=groups,cn=accounts,dc=testrelm



Version-Release number of selected component (if applicable):
ipa-server-2.0.0-17.el6.x86_64
ipa-admintools-2.0.0-17.el6.x86_64


How reproducible:


Steps to Reproduce:
1. ipa user-add --first=test --last=test --postalcode=01730 test
2.
3.
  
Actual results:


Expected results:
postalcode to be 01730

Additional info:

Comment 1 Jenny Severance 2011-04-01 18:49:18 UTC
looks like it is when it starts with a 0

Comment 5 Rob Crittenden 2011-04-06 02:31:20 UTC
master: 316efbc32f7b586df36653aa894e686313a64764

ipa-2-0: c4fb150837d9e141eb95e5d4d97934271703551b

To Test:

Scenario 1: Testing on the master itself

- ipa-server-install <your favorite options>
- kinit admin
- ipa user-add --first=Tim --last=User --postalcode=01234-1111 tuser

Verify in output that ZIP is correct.

Scenario 2: Test with a previous version of ipa-client

Using the IPA server from Scenario 1, on another machine:

- yum install ipa-client
- ipa-client-install
Enter the server from Scenario 1
Enroll using admin credentials
- kinit admin
- ipa user-add --first=Tim --last=User --postalcode=01234-1111 tuser

Expected error:

ipa: ERROR: invalid 'postalcode': must be an integer

- ipa user-add --first=Tim --last=User --postalcode=01234 tuser

Expected output:

ZIP = 668

The expectation here is not that the zip will be correct, it won't with older bits and a leading 0. We just want to confirm that it won't blow up.

Comment 7 Jenny Severance 2011-04-07 19:00:54 UTC
verified:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipa-user-cli-mod-047: modify user's postalcode - bug 692945
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Setting user postalcode - code beginning with 0
:: [   LOG    ] :: Value of ZIP for user sup34 is as expected: 01730
:: [   PASS   ] :: Verify user's postalcode
:: [   LOG    ] :: Duration: 6s
:: [   LOG    ] :: Assertions: 2 good, 0 bad
:: [   PASS   ] :: RESULT: ipa-user-cli-mod-047: modify user's postalcode - bug 692945


# ipa user-add --first=Tim --last=User --postalcode=01234-1111 tuser
------------------
Added user "tuser"
------------------
  User login: tuser
  First name: Tim
  Last name: User
  Full name: Tim User
  Display name: Tim User
  Initials: TU
  Home directory: /home/tuser
  GECOS field: tuser
  Login shell: /bin/sh
  Kerberos principal: tuser@TESTRELM
  UID: 167200007
  ZIP: 01234-1111

version:
ipa-server-2.0.0-20.el6.x86_64
ipa-admintools-2.0.0-20.el6.x86_64

Comment 8 errata-xmlrpc 2011-05-19 13:44:50 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0631.html


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