Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 817821

Summary: ipa config-mod --delattr misleading invalid error messages
Product: Red Hat Enterprise Linux 6 Reporter: Jenny Severance <jgalipea>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: low Docs Contact:
Priority: low    
Version: 6.3CC: mkosek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-3.0.0-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 09:12:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jenny Severance 2012-05-01 13:07:10 UTC
Description of problem:

ipa config-mod --delattr returns misleading/invalid error messages with the following negative tests ::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_delattr invalid attribute negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa config-mod --delattr=ipaCustomFields=FALSE
:: [   LOG    ] :: "ipa config-mod --delattr=ipaCustomFields=FALSE" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: ipacustomfields does not contain 'FALSE'  EXP: ipa: ERROR: 'ipacustomfields' does not exist 
:: [   FAIL   ] :: Verify expected error message. (Expected 0, got 1)
:: [   LOG    ] :: Duration: 5s
:: [   LOG    ] :: Assertions: 0 good, 2 bad
:: [   FAIL   ] :: RESULT: ipaconfig_delattr invalid attribute negative test


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipahomesrootdir negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa config-mod --delattr=ipahomesrootdir=/home/
:: [   LOG    ] :: "ipa config-mod --delattr=ipahomesrootdir=/home/" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: ipahomesrootdir does not contain '/home/'  EXP: ipa: ERROR: 'ipahomesrootdir' is required 
:: [   FAIL   ] :: Verify expected error message. (Expected 0, got 1)
:: [   LOG    ] :: Duration: 5s
:: [   LOG    ] :: Assertions: 0 good, 2 bad
:: [   FAIL   ] :: RESULT: ipaconfig_mod_delattr ipahomesrootdir negative test

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipadefaultloginshell negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa config-mod --delattr=ipadefaultloginshell=/bin/bash
:: [   LOG    ] :: "ipa config-mod --delattr=ipadefaultloginshell=/bin/bash" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: ipadefaultloginshell does not contain '/bin/bash'  EXP: ipa: ERROR: 'ipadefaultloginshell' is required 
:: [   FAIL   ] :: Verify expected error message. (Expected 0, got 1)
:: [   LOG    ] :: Duration: 5s
:: [   LOG    ] :: Assertions: 0 good, 2 bad
:: [   FAIL   ] :: RESULT: ipaconfig_mod_delattr ipadefaultloginshell negative test

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipadefaultprimarygroup negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa config-mod --delattr=ipadefaultprimarygroup=cn=ipausers,cn=accounts,cn=dc=testrelm,dc=com
:: [   LOG    ] :: "ipa config-mod --delattr=ipadefaultprimarygroup=cn=ipausers,cn=accounts,cn=dc=testrelm,dc=com" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: ipadefaultprimarygroup does not contain 'cn=ipausers,cn=accounts,cn=dc=testrelm,dc=com'  EXP: ipa: ERROR: 'ipadefaultprimarygroup' is required 
:: [   FAIL   ] :: Verify expected error message. (Expected 0, got 1)
:: [   LOG    ] :: Duration: 5s
:: [   LOG    ] :: Assertions: 0 good, 2 bad
:: [   FAIL   ] :: RESULT: ipaconfig_mod_delattr ipadefaultprimarygroup negative test


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

ipa-server-2.2.0-11.el6.i686


How reproducible:
always

Steps to Reproduce:
1.  see description
2.
3.
  
Actual results:
ipa: ERROR: <ipaconfigattr> does not contain '<currentvalueofconfigattr>'

Expected results:

ipa: ERROR: '<ipaconfigattr>' is required


Additional info:

The following config attributes return the correct error messages ::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipasearchtimelimit negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa config-mod --delattr=ipasearchtimelimit=2
:: [   LOG    ] :: "ipa config-mod --delattr=ipasearchtimelimit=2" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: 'ipasearchtimelimit' is required
:: [   PASS   ] :: Verify expected error message.
:: [   LOG    ] :: Duration: 6s
:: [   LOG    ] :: Assertions: 2 good, 0 bad
:: [   PASS   ] :: RESULT: ipaconfig_mod_delattr ipasearchtimelimit negative test

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipasearchrecordslimit negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa config-mod --delattr=ipasearchrecordslimit=100
:: [   LOG    ] :: "ipa config-mod --delattr=ipasearchrecordslimit=100" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: 'ipasearchrecordslimit' is required
:: [   PASS   ] :: Verify expected error message.
:: [   LOG    ] :: Duration: 6s
:: [   LOG    ] :: Assertions: 2 good, 0 bad
:: [   PASS   ] :: RESULT: ipaconfig_mod_delattr ipasearchrecordslimit negative test

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipacertificatesubjectbase negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa config-mod --delattr=ipacertificatesubjectbase=O=TESTRELM.COM
:: [   LOG    ] :: "ipa config-mod --delattr=ipacertificatesubjectbase=O=TESTRELM.COM" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: 'ipacertificatesubjectbase' is required
:: [   PASS   ] :: Verify expected error message.
:: [   LOG    ] :: Duration: 6s
:: [   LOG    ] :: Assertions: 2 good, 0 bad
:: [   PASS   ] :: RESULT: ipaconfig_mod_delattr ipacertificatesubjectbase negative test

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipapwdexpadvnotify negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa config-mod --delattr=ipapwdexpadvnotify=4
:: [   LOG    ] :: "ipa config-mod --delattr=ipapwdexpadvnotify=4" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: 'ipapwdexpadvnotify' is required
:: [   PASS   ] :: Verify expected error message.
:: [   LOG    ] :: Duration: 6s
:: [   LOG    ] :: Assertions: 2 good, 0 bad
:: [   PASS   ] :: RESULT: ipaconfig_mod_delattr ipapwdexpadvnotify negative test

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipamaxusernamelength negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa config-mod --delattr=ipamaxusernamelength=32
:: [   LOG    ] :: "ipa config-mod --delattr=ipamaxusernamelength=32" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: 'ipamaxusernamelength' is required
:: [   PASS   ] :: Verify expected error message.
:: [   LOG    ] :: Duration: 5s
:: [   LOG    ] :: Assertions: 2 good, 0 bad
:: [   PASS   ] :: RESULT: ipaconfig_mod_delattr ipamaxusernamelength negative test

Comment 1 Rob Crittenden 2012-05-01 13:55:46 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/2699

Comment 2 Rob Crittenden 2012-05-29 21:47:52 UTC
Fixed upstream.

master: 51bd68eaf5e2b21ce79f6b848a67f88abe9f7e11

Comment 5 Namita Soman 2013-01-15 03:32:48 UTC

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_delattr invalid attribute negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [16:13:24] ::  Executing: ipa config-mod --delattr=ipaCustomFields=FALSE
ipa: ERROR: invalid 'ipacustomfields': No such attribute on this entry
:: [16:13:25] ::  "ipa config-mod --delattr=ipaCustomFields=FALSE" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: invalid 'ipacustomfields': No such attribute on this entry
:: [   PASS   ] :: Verify expected error message.
:: [16:13:25] ::  Verifies bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=817821
'5e86e8d7-6738-4d25-a1fe-14893d64ab5e'
ipaconfig-delattr-invalid-attribute-negative-test result: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipahomesrootdir negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [16:13:27] ::  Executing: ipa config-mod --delattr=ipahomesrootdir=/home/
ipa: ERROR: ipahomesrootdir does not contain '/home/'
:: [16:13:28] ::  "ipa config-mod --delattr=ipahomesrootdir=/home/" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: ipahomesrootdir does not contain '/home/'
:: [   PASS   ] :: Verify expected error message.
:: [16:13:29] ::  Verifies bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=817821
'14fa316c-001a-4f8c-972f-2804b214c467'
ipaconfig-mod-delattr-ipahomesrootdir-negative-test result: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipadefaultloginshell negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [16:13:33] ::  Executing: ipa config-mod --delattr=ipadefaultloginshell=/bin/bash
ipa: ERROR: ipadefaultloginshell does not contain '/bin/bash'
:: [16:13:34] ::  "ipa config-mod --delattr=ipadefaultloginshell=/bin/bash" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: ipadefaultloginshell does not contain '/bin/bash'
:: [   PASS   ] :: Verify expected error message.
:: [16:13:35] ::  Verifies bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=817821
'967ce039-ba5b-412f-ab59-a7a7e4ecd728'
ipaconfig-mod-delattr-ipadefaultloginshell-negative-test result: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: ipaconfig_mod_delattr ipadefaultprimarygroup negative test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [16:13:36] ::  Executing: ipa config-mod --delattr=ipadefaultprimarygroup=cn=ipausers,cn=accounts,cn=dc=testrelm,dc=com
ipa: ERROR: ipadefaultprimarygroup does not contain 'cn=ipausers,cn=accounts,cn=dc=testrelm,dc=com'
:: [16:13:37] ::  "ipa config-mod --delattr=ipadefaultprimarygroup=cn=ipausers,cn=accounts,cn=dc=testrelm,dc=com" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: ipadefaultprimarygroup does not contain 'cn=ipausers,cn=accounts,cn=dc=testrelm,dc=com'
:: [   PASS   ] :: Verify expected error message.
:: [16:13:38] ::  Verifies bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=817821
'231c85a4-7911-463b-99e9-c93a772f22d9'
ipaconfig-mod-delattr-ipadefaultprimarygroup-negative-test result: PASS

Comment 7 errata-xmlrpc 2013-02-21 09:12:20 UTC
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-2013-0528.html