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 2076819 - [RHEL 9 Beta] newusers command does not suggest to use --badnames when special characters are present in the file & when --badnames is not provided
Summary: [RHEL 9 Beta] newusers command does not suggest to use --badnames when specia...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: shadow-utils
Version: 9.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Iker Pedrosa
QA Contact: Anuj Borah
URL: http//
Whiteboard:
Depends On:
Blocks: 2010412
TreeView+ depends on / blocked
 
Reported: 2022-04-20 01:49 UTC by Abdul Rehman Quadri
Modified: 2023-05-09 10:17 UTC (History)
4 users (show)

Fixed In Version: shadow-utils-4.9-6.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 08:15:11 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-119326 0 None None None 2022-04-20 01:57:19 UTC
Red Hat Issue Tracker RHELX-76 0 None None None 2022-09-28 15:10:37 UTC
Red Hat Issue Tracker SSSD-4575 0 None None None 2022-04-25 07:43:32 UTC
Red Hat Product Errata RHBA-2023:2467 0 None None None 2023-05-09 08:15:13 UTC

Description Abdul Rehman Quadri 2022-04-20 01:49:53 UTC
Description of problem:
The newusers command reads a file and uses this information to update a set of existing users or to create new users. Until now it was not allowed to use any special characters in the username/groupname except a few. But with this release, we have a new option called --badnames that allows us to use special symbols in the usernames/groupnames.

When we execute the newusers command on a file that has special characters in the user/group name, the command fails with an error but there is no suggestion provided to use "--badnames".


Version-Release number of selected component (if applicable):
shadow-utils-4.9-3.el9.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Login as superuser or privileged user
2. Create a file as per the valid syntax for e.g: a file “batchusers” with the following users data:
users@1:users@1:1010:1010:Users 1:/home/users1:/bin/bash
users@2:users@2:1011:1011:Users 2:/home/users2:/bin/bash
3. Execute the command: # newusers batchusers

4. Execute command: # newusers --badnames batchusers

Actual results:
1. The result of step 3 is:
newusers: invalid user name 'users@1'
newusers: line 1: can't create user
newusers: invalid user name 'users@2'
newusers: line 2: can't create user

2. The execution of step 4 results in adding users successfully.

Expected results:
It would be helpful if Step 3 gives a suggestion to use "--badnames" along with the error messages.

Additional info:

Comment 1 Iker Pedrosa 2022-05-09 06:46:44 UTC
master:
    Suggest badname if name has special characters - 0593b330d8413e9694b5d6783bb90974c9b141c5
    po: update translation files - b62d02f38f2c38d1a944629c07d3cb021c93d521
    man: correct "badname" option - edf5ea79740c328b71f7840fd598c403cea33df8
    src: correct "badname" option - 45d674621918664c8736f94f862e86bddf4c3fd4

Comment 10 errata-xmlrpc 2023-05-09 08:15:11 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 (shadow-utils bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2467


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