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 854321

Summary: Password policies are sorted lexicographically instead of numerically
Product: Red Hat Enterprise Linux 6 Reporter: Dmitri Pal <dpal>
Component: ipaAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.4CC: mkosek, nsoman
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:17:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dmitri Pal 2012-09-04 16:00:54 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/3039

Password policies are sorted by priority. They are sorted incorrectly: lexicographically instead of numerically. 

{{{
#ipa pwpolicy-find
  Group: admins
  Priority: 1

  Group: dd
  Priority: 10

  Group: editors
  Priority: 2

  Group: trust admins
  Priority: 3

  Group: ipausers
  Priority: 4

  Group: monsters
  Priority: 5

  Group: puppets
  Priority: 6

  Group: global_policy
  Max lifetime (days): 1000
  Min lifetime (hours): 1
  History size: 0
  Character classes: 0
  Min length: 8
  Max failures: 6
  Failure reset interval: 60
  Lockout duration: 600
}}}

Comment 1 Rob Crittenden 2012-09-04 19:05:52 UTC
Simple fix, just need to always treat the CoS priority as a number.

Fixed upstream.

master: 208e6930de94f56264f5964411bbe1b0d6684516

ipa-3-0: 9286df1fe338459677d1479caac2f1f2f26c429a

Comment 4 Namita Soman 2013-01-14 17:19:58 UTC
Verified using ipa-server-3.0.0-20.el6.x86_64

sorted by priority....

# ipa pwpolicy-find
  Group: two
  Priority: 2

  Group: three
  Priority: 3

  Group: four
  Priority: 4

  Group: five
  Priority: 5

  Group: global_policy
  Max lifetime (days): 90
  Min lifetime (hours): 1
  History size: 0
  Character classes: 0
  Min length: 8
  Max failures: 6
  Failure reset interval: 60
  Lockout duration: 600
----------------------------
Number of entries returned 5
----------------------------

Comment 6 errata-xmlrpc 2013-02-21 09:17:29 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