Bug 853153
| Summary: | passwd -l prepends '!!' to password hash where usermod -L prepends just '!' | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Robert Menotte <rdmenotte> |
| Component: | libuser | Assignee: | Jakub Hrozek <jhrozek> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | BaseOS QE Security Team <qe-baseos-security> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 39 | CC: | fdeutsch, mpitt, tmraz, weiwang |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2024-11-11 05:42:00 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Robert Menotte
2012-08-30 15:39:54 UTC
The lock/unlock feature of passwd is done by libuser. CCing owner of libuser for comments. I suppose changing the functionality would have unwanted side effects so I'd really prefer changing the documentation to reflect the current situation. The libuser behavior does contradict the documentation, and the commit logs do not indicate any reason for this behavior. There is also http://lists.opensuse.org/opensuse-bugs/2010-08/msg02301.html discussing this difference. http://en.wikipedia.org/wiki/Shadow_password suggests something else entirely. We will probably need to review all applications that use the shadow information, make sure the documentation is correct, update programs as necessary to match it (... and perhaps update usermod to handle the "!!" prefix as well). When I posted this bug, I was unsure if there was to be a functional difference between a single and double "!" prefix. Assuming the Wikipedia entry is more or less up to date, I think a relatively quick and sufficient fix would be to update the documentation for each respective command and have usermod utilize "!!" instead of "!" for all locking actions. "NP", "!", or null signify no password is set on the account. As usermod doesn't provide a way to delete a password, I think it makes sense for it to utilize "!!". But you're right Miloslav, it will require going through every utility to make sure that those that use /etc/shadow are utilizing the lock prefix correctly. I have filed #951743 for the usermod compatibility update; reassigning this to libuser because there's nothing to fix in passwd. I'm inclined to block the libuser change on review of other users (changing libuser might in turn break something else that expects "!!"); Tomáš, what do you think? I do not know of anything that would expect "!!" for password locking. I'd prefer to keep the usermod -L behavior as is. For the usermod -U I would accept changing the behavior so one or two '!' are removed if the resulting password hash is not empty string. (In reply to comment #6) > I'd prefer to keep the usermod -L behavior as is. Of course, there's no reason to change usermod -L. > For the usermod -U I would accept changing the behavior so one or two '!' > are removed if the resulting password hash is not empty string. ... it's only -U for interoperability with the (as far as we know) incorrect libuser. This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate, in the next release of Red Hat Enterprise Linux. *** Bug 1336663 has been marked as a duplicate of this bug. *** Note that usermod -U was already fixed to unlock properly accounts locked by both usermod -L and passwd -l. I am not sure whether modifying libuser is needed - it might be good for consistency in /etc/{shadow,passwd} but it will not fix anything 'user visible'.
Let's move it to Fedora. This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle. Changing version to '25'. This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '25'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. This bug appears to have been reported against 'rawhide' during the Fedora 30 development cycle. Changing version to '30. This message is a reminder that Fedora 30 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '30'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 30 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. After 11 years this bug is still happening in current Fedora 39. This message is a reminder that Fedora Linux 39 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '39'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 39 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed. I just re-tested that on Fedora 41, and this is finally fixed \o/ |