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 1289505 - ipa pwpolicy-show deserves better error message
Summary: ipa pwpolicy-show deserves better error message
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: IPA Maintainers
QA Contact: Namita Soman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-08 10:55 UTC by Abhijeet Kasurde
Modified: 2016-01-04 18:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-04 18:01:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Abhijeet Kasurde 2015-12-08 10:55:28 UTC
Description of problem:
If non-admin user performs pwpolicy-show operation, then command returns following error 

# ipa pwpolicy-show
ipa: ERROR: None: password policy not found

Version-Release number of selected component (if applicable):
ipa-server-4.2.0-15.el7_2.3.x86_64

How reproducible:
100%


Steps to Reproduce:

# echo Secret123 | kinit admin
Password for admin: 
# echo Passw0rd1 | ipa user-add --first abc --last abc abc --password
----------------
Added user "abc"
----------------
  User login: abc
  First name: abc
  Last name: abc
  Full name: abc abc
  Display name: abc abc
  Initials: aa
  Home directory: /home/abc
  GECOS: abc abc
  Login shell: /bin/sh
  Kerberos principal: abc
  Email address: abc
  UID: 327400005
  GID: 327400005
  Password: True
  Member of groups: ipausers
  Kerberos keys available: True
# kinit abc
Password for abc: 
Password expired.  You must change it now.
Enter new password: 
Enter it again: 
Password mismatch.  Please try again.
Enter new password: 
Enter it again: 
# ipa pwpolicy-show
ipa: ERROR: None: password policy not found


Actual results:
Error message "ipa: ERROR: None: password policy not found"

Expected results:
Error message should be similar to "Check your permissions" or "Insufficient access: Insufficient 'delete' privilege to delete the entry "

Additional info:
same case goes with ipa pwpolicy-mod

Comment 1 Petr Vobornik 2015-12-08 13:08:53 UTC
IMO it is not a bug. 

Printing the message would show which policies are there. IPA framework doesn't have any additional rights than the user so it doesn't know which policies are there.

Comment 2 Petr Vobornik 2016-01-04 18:01:10 UTC
closing, see comment 1


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