#9378 [RFE] Descriptive error message in ipa user-add
Closed: fixed a year ago by frenaud. Opened a year ago by frenaud.

Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 8): Bug 2150217

Description of problem:

Run "ipa user-add" to add a username without a letter.

The error message is not very descriptive. In below examples, all input strings meet the requirements specified in error message. i.e. The strings contains numbers, -, _, . and/or $. (letter is absence in all provided strings).

The error message should clear indicates that username must contain at least a letter.

# ipa user-add '$_-1234567' --first=User --last=Last
ipa: ERROR: invalid 'login': may only include letters, numbers, _, -, . and $

# ipa user-add '$_1234567' --first=User --last=Last
ipa: ERROR: invalid 'login': may only include letters, numbers, _, -, . and $

# ipa user-add '$1234567' --first=User --last=Last
ipa: ERROR: invalid 'login': may only include letters, numbers, _, -, . and $

# ipa user-add '1234567' --first=User --last=Last
ipa: ERROR: invalid 'login': may only include letters, numbers, _, -, . and $

# ipa user-add '$_1234567.' --first=User --last=Last
ipa: ERROR: invalid 'login': may only include letters, numbers, _, -, . and $

Version-Release number of selected component (if applicable):
ipa-client-4.9.8-8.module+el8.6.0+16878+6c033536.x86_64
ipa-client-common-4.9.8-8.module+el8.6.0+16878+6c033536.noarch
ipa-common-4.9.8-8.module+el8.6.0+16878+6c033536.noarch
ipa-healthcheck-0.7-10.module+el8.6.0+14292+18b36d36.noarch
ipa-healthcheck-core-0.7-10.module+el8.6.0+14292+18b36d36.noarch
ipa-selinux-4.9.8-8.module+el8.6.0+16878+6c033536.noarch
ipa-server-4.9.8-8.module+el8.6.0+16878+6c033536.x86_64
ipa-server-common-4.9.8-8.module+el8.6.0+16878+6c033536.noarch
ipa-server-dns-4.9.8-8.module+el8.6.0+16878+6c033536.noarch
ipa-server-trust-ad-4.9.8-8.module+el8.6.0+16878+6c033536.x86_64

Metadata Update from @frenaud:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=2150217

a year ago

Metadata Update from @frenaud:
- Issue assigned to frenaud

a year ago

Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/6829

a year ago

master:

  • 7b0ad59 user or group name: explain the supported format

ipa-4-9:

  • f42a106 user or group name: explain the supported format

ipa-4-10:

  • 7830ab9 user or group name: explain the supported format

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

a year ago

master:

  • 4a3e3ef test: add tests for descriptive error message in ipa user-add

ipa-4-10:

  • 3bacdf2 test: add tests for descriptive error message in ipa user-add

ipa-4-9:

  • 4d55ee3 test: add tests for descriptive error message in ipa user-add

Metadata Update from @abbra:
- Custom field changelog adjusted to The commands ipa user-add or ipa group-add validate the format of the user/group name and display an error message. In this release, the message is expanded for better clarity.

8 months ago

Log in to comment on this ticket.

Metadata