Red Hat Bugzilla – Bug 723969
Regression: Incorrect Error message returned attempting to add user with uid 0
Last modified: 2015-01-04 18:50:07 EST
Description of problem: The error message changed and doesn't make sense with the latest ipa server build: Error message you to state "must" and now is "can" :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: ipa-user-cli-add-014: uid 0 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Executing: ipa user-add --first=uid0 --last=uid0 --uid=0 uid0 :: [ LOG ] :: "ipa user-add --first=uid0 --last=uid0 --uid=0 uid0" failed as expected. :: [ LOG ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'uid': can be at least 1 EXP: ipa: ERROR: invalid 'uid': must be at least 1 :: [ FAIL ] :: Verify expected error message. (Expected 0, got 1) :: [ LOG ] :: Duration: 5s :: [ LOG ] :: Assertions: 0 good, 1 bad :: [ FAIL ] :: RESULT: ipa-user-cli-add-014: uid 0 Version-Release number of selected component (if applicable): ipa-server.i686 0:2.0.99-3.20110721T0516zgit8e8ad51.el6 How reproducible: Steps to Reproduce: 1. ipa user-add --first=uid0 --last=uid0 --uid=0 uid0 2. 3. Actual results: ipa: ERROR: invalid 'uid': can be at least 1 Expected results: ipa: ERROR: invalid 'uid': must be at least 1 Additional info:
same with modifying user ... :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: ipa-user-cli-mod-045: uid 0 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Executing: ipa user-mod --setattr uidNumber=0 sup34 :: [ LOG ] :: "ipa user-mod --setattr uidNumber=0 sup34" failed as expected. :: [ LOG ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'uid': can be at least 1 EXP: ipa: ERROR: invalid 'uid': must be at least 1 :: [ FAIL ] :: Verify expected error message for --setattr. (Expected 0, got 1) :: [ LOG ] :: Executing: ipa user-mod --uid=0 sup34 :: [ LOG ] :: "ipa user-mod --uid=0 sup34" failed as expected. :: [ LOG ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'uid': can be at least 1 EXP: ipa: ERROR: invalid 'uid': must be at least 1 :: [ FAIL ] :: Verify expected error message for --uid. (Expected 0, got 1) :: [ LOG ] :: Duration: 7s :: [ LOG ] :: Assertions: 0 good, 2 bad :: [ FAIL ] :: RESULT: ipa-user-cli-mod-045: uid 0
Changing a message is now a regression? In any case with negative numbers the error message was even more unreadable. If you pass in > MININ the error message was: invalid 'attribute': must be at least -2147483648 can makes much more sense in this case IMHO. That seemed a bit odd so I changed the wording to can. It is trivial to change back as long as we come to an agreement. Maybe Deon should referee.
I didn't set the Regression key word because it is so minor. But yeah, "must" just seems more appropriate.
master: 87821f2049fb6f630c27e08d9939205bc87513e2 ipa-2-0: 2ee6295b48eb73299ec416d637ad3d6774b088a9
verified : :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: ipa-user-cli-add-014: uid 0 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ LOG ] :: Executing: ipa user-add --first=uid0 --last=uid0 --uid=0 uid0 :: [ LOG ] :: "ipa user-add --first=uid0 --last=uid0 --uid=0 uid0" failed as expected. :: [ LOG ] :: Error message as expected: ipa: ERROR: invalid 'uid': must be at least 1 :: [ PASS ] :: Verify expected error message. :: [ LOG ] :: Duration: 9s :: [ LOG ] :: Assertions: 1 good, 0 bad :: [ PASS ] :: RESULT: ipa-user-cli-add-014: uid 0 version : ipa-server-2.1.1-4.el6.x86_64
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Do not document
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2011-1533.html