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 1956228 - Systemctl fail starting service when username starts by a numerical digit.
Summary: Systemctl fail starting service when username starts by a numerical digit.
Keywords:
Status: CLOSED DUPLICATE of bug 1848373
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: systemd
Version: 8.3
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: beta
: ---
Assignee: systemd-maint
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-03 08:49 UTC by Bruno Gillet
Modified: 2021-05-03 11:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-03 11:14:02 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Service unit file used to replicate the issue (359 bytes, text/plain)
2021-05-03 08:49 UTC, Bruno Gillet
no flags Details

Description Bruno Gillet 2021-05-03 08:49:10 UTC
Created attachment 1778870 [details]
Service unit file used to replicate the issue

Created attachment 1778870 [details]
Service unit file used to replicate the issue

Description of problem:

When a username starts with numerical digits in a systemd unit file (ie. username = 00abc), systemctl rejects any action on the service with the following error :

Invalid user/group name or numeric ID: 00abc

If user name is reverted to a non numerical prefixed one (ie. abc) service may be managed (start/status/stop) without any problem.

Version-Release number of selected component (if applicable):

systemd 239 (239-41.el8_3.2)
shadow-utils-4.6-11

How reproducible:

Staright forward : Set up an up-to-date RHEL 8.3 VM, create a numerically prefixed user, set a service unit file with that user. Service start or status will fail. Try the same with a non numerically prefixed user, it will work.

Steps to Reproduce:
1. Set up a RHEL8.3 VM, update it.
2. Create a numerically starting user (00git in our replication)
3. Set up a service with this user name (gitea in ur replication)
4. try to get it's status or start it then you will get the following error (from our replication):

[root@rhel83-tst ~]# systemctl status gitea
- gitea.service - Gitea (Git with a cup of tea)
   Loaded: bad-setting (Reason: Unit gitea.service has a bad unit file setting.)
   Active: inactive (dead)

mai 03 04:25:26 rhel83-tst systemd[1]: /usr/lib/systemd/system/gitea.service:9: Invalid user/group name or numeric ID: 00git

5. change user to non numerically starting, then it works (git in our replication)

Actual results:

systemctl fails for managing that service, rejecting the username as invalid.

Expected results:

systemctl should work as planned to start, stop or get a service status.

Additional info:

This is not related to full numeric username that are obviously not supported.
Numerically prefixed username should work.
Attached is the gitea.service unit file used in our replication test.

Comment 1 David Tardon 2021-05-03 11:14:02 UTC

*** This bug has been marked as a duplicate of bug 1848373 ***


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