Bug 496966 - Max.Username Length is not respected
Summary: Max.Username Length is not respected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: freeIPA
Classification: Retired
Component: ipa-server
Version: 1.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: v2 release
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: 431020
TreeView+ depends on / blocked
 
Reported: 2009-04-21 20:46 UTC by Stefan Freyr Stefansson
Modified: 2015-01-04 23:37 UTC (History)
3 users (show)

Fixed In Version: freeipa-2.0.0-1.fc15
Clone Of:
Environment:
Last Closed: 2012-03-28 09:29:16 UTC
Embargoed:


Attachments (Terms of Use)

Description Stefan Freyr Stefansson 2009-04-21 20:46:56 UTC
Description of problem:
We have set Max.Username Length to 255 in our policy but when we try to create a user with more than 33 characters in the username it fails with the error message "Enter only letters, numbers, _ (underscore), - (dash) or $".

How reproducible:
Always

Steps to Reproduce:
1) Set Max.Username Length to 255
2) Try to create user with >33 characters in username and it will fail.
  
Actual results:
Error message displayed: "Enter only letters, numbers, _ (underscore), - (dash) or $". This happens both in the web interface as well as in the CLI.

Expected results:
User should be created.

Comment 1 Rob Crittenden 2010-01-29 16:04:12 UTC
Yes, I suppose we should document what the maximum is. This is bounded based on what shadowutils supports. We use the following regular expression:

^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]?$

The trailing $ is there to support samba machine names.

Comment 2 David O'Brien 2010-02-01 03:14:08 UTC
When I was documenting this for version 1.x I was provided with the following regex: [a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]

Has this changed or are we looking at two different things?

Comment 3 Rob Crittenden 2010-02-01 14:10:28 UTC
Perhaps you were provided with a truncated version, probably by me :-(

Comment 5 Rob Crittenden 2010-09-14 17:00:07 UTC
https://fedorahosted.org/freeipa/ticket/226

Comment 6 Rob Crittenden 2010-10-13 17:03:26 UTC
master: 3d55b66e48466bf190f85d78d15c040d27bc136d


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