Bug 2313559
Summary: | useradd returns an error message when creating system users | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Vladislav Grigoryev <vg.aetera> |
Component: | shadow-utils | Assignee: | Iker Pedrosa <ipedrosa> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 40 | CC: | ipedrosa, tm, vg.aetera |
Target Milestone: | --- | Keywords: | Reopened, Triaged |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | shadow-utils-4.15.1-11.fc41 shadow-utils-4.15.1-12.fc41 shadow-utils-4.15.1-4.fc40 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2024-10-12 00:19:40 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: |
I think you catched https://github.com/shadow-maint/shadow/issues/1072. I'll start backporting it. Just a heads-up but the fix will take some time to land in fedora 40. FEDORA-2024-60ccc2b07a (shadow-utils-4.15.1-11.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2024-60ccc2b07a FEDORA-2024-60ccc2b07a has been pushed to the Fedora 41 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-60ccc2b07a` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-60ccc2b07a See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2024-60ccc2b07a (shadow-utils-4.15.1-11.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report. I tested Fedora 41 and the problem persists: ``` > rpm -q shadow-utils shadow-utils-4.15.1-11.fc41.x86_64 > sudo useradd -r test useradd: failed to reset the lastlog entry of UID 982: No such file or directory ``` I'm unable to reproduce it after the patch. One thing I can think of is that you are reusing the UID of an already deleted user. Is that possible? Creating 100 users for testing:
```
> for I in $(seq 100); do sudo useradd -r test${RANDOM}; done
useradd: failed to reset the lastlog entry of UID 958: No such file or directory
useradd: failed to reset the lastlog entry of UID 957: No such file or directory
useradd: failed to reset the lastlog entry of UID 956: No such file or directory
[...]
useradd: failed to reset the lastlog entry of UID 861: No such file or directory
useradd: failed to reset the lastlog entry of UID 860: No such file or directory
useradd: failed to reset the lastlog entry of UID 859: No such file or directory
```
Ok, now I've been able to reproduce it. I'll take a closer look and how to fix it in the following days. FEDORA-2024-7cf039d7dd (shadow-utils-4.15.1-12.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2024-7cf039d7dd FEDORA-2024-7cf039d7dd has been pushed to the Fedora 41 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-7cf039d7dd` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-7cf039d7dd See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2024-7cf039d7dd (shadow-utils-4.15.1-12.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2024-8bc9e9b4d9 (shadow-utils-4.15.1-4.fc40) has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2024-8bc9e9b4d9 FEDORA-2024-8bc9e9b4d9 has been pushed to the Fedora 40 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-8bc9e9b4d9` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-8bc9e9b4d9 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2024-8bc9e9b4d9 (shadow-utils-4.15.1-4.fc40) has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report. |
useradd returns an error message when creating system users. Reproducible: Always Steps to Reproduce: ``` sudo useradd -r test ``` Actual Results: ``` > sudo useradd -r test useradd: failed to reset the lastlog entry of UID 983: No such file or directory ``` Expected Results: useradd should not return errors when creating system users. This problem also happens when installing packages with DNF.