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 2159544 - lslogins "Password is locked" status changed in util-linux-2.32.1-38
Summary: lslogins "Password is locked" status changed in util-linux-2.32.1-38
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: util-linux
Version: 8.7
Hardware: All
OS: All
unspecified
low
Target Milestone: rc
: ---
Assignee: Karel Zak
QA Contact: Radka Brychtova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-09 23:50 UTC by Sunny Wu
Modified: 2023-07-07 01:08 UTC (History)
0 users

Fixed In Version: util-linux-2.32.1-40.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-16 09:12:29 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-144582 0 None None None 2023-01-10 00:12:30 UTC
Red Hat Product Errata RHBA-2023:3054 0 None None None 2023-05-16 09:12:40 UTC

Description Sunny Wu 2023-01-09 23:50:40 UTC
Description of problem:

What is the definition of "Login by password disabled"?

Password hash field of shadow file of a new user account without password defined contains "!!" only. The user is not (and should not be) able to login with password. The status of this check item has been changed to "no" in util-linux-2.32.1-38. (https://bugzilla.redhat.com/show_bug.cgi?id=2093166)

=========================
RHEL8.6:

# rpm -qa | grep util-linux
util-linux-2.32.1-35.el8.x86_64

# useradd test-user

# grep test-user /etc/passwd
test-user:x:1003:1003::/home/test-user:/bin/bash

# grep test-user /etc/shadow
test-user:!!:19349:0:99999:7:::

# lslogins test-user
Username:                           test-user                           
UID:                                1003                                
Gecos field:                                                            
Home directory:                     /home/test-user                     
Shell:                              /bin/bash                           
No login:                           no                                  
Password is locked:                 no                                  
Password not required:              no                                  
Login by password disabled:         yes                                 
Primary group:                      test-user                           
GID:                                1003                                
Hushed:                             no                                  
Password expiration warn interval:  7                                   
Password changed:                   19:00                               
Maximum change time:                99999                               
Running processes:                  0                                   

Last logs:

=====
RHEL8.7:

# rpm -qa | grep util-linux
util-linux-2.32.1-38.el8.x86_64

# useradd test-user

# grep test-user /etc/passwd
test-user:x:1004:1004::/home/test-user:/bin/bash

# grep test-user /etc/shadow
test-user:!!:19349:0:99999:7:::

# lslogins test-user
Username:                           test-user                           
UID:                                1004                                
Gecos field:                                                            
Home directory:                     /home/test-user                     
Shell:                              /bin/bash                           
No login:                           no                                  
Password is locked:                 yes                                 
Password not required (empty):      yes                                 
Login by password disabled:         no                                  
Primary group:                      test-user                           
GID:                                1004                                
Hushed:                             no                                  
Password expiration warn interval:  7                                   
Password changed:                   10:00                               
Maximum change time:                99999                               
Running processes:                  0                                   

Last logs:

=========================

Can we have a clear definition of each check items?

Comment 1 Karel Zak 2023-01-31 07:39:27 UTC
I'll add some details to the man page.

Comment 3 Sunny Wu 2023-02-01 23:29:13 UTC
In the new definition:

> *"Login by password disabled"*::
> 'yes' means that there is no valid password. The password hash is missing, or the hash method is unknown or contains invalid chars.

This is still not clear. In below examples, two new users were created. One without password set, and the other one with password removed.

- test-user1 does not have a valid password hash
- test-user2's password hash is missing

My interpretation is that, both should display "yes".

=====================

# useradd test-user1
# useradd test-user2

# passwd -d test-user2
Removing password for user test-user2.
passwd: Note: deleting a password also unlocks the password.
passwd: Success

# cat /etc/passwd | grep test-user
test-user1:x:1003:1003::/home/test-user1:/bin/bash
test-user2:x:1004:1004::/home/test-user2:/bin/bash

# cat /etc/shadow | grep test-user
test-user1:!!:19389:0:99999:7:::
test-user2::19389:0:99999:7:::

# lslogins test-user1
Username:                           test-user1                          
UID:                                1003                                
Gecos field:                                                            
Home directory:                     /home/test-user1                    
Shell:                              /bin/bash                           
No login:                           no                                  
Password is locked:                 yes                                 
Password not required (empty):      yes                                 
Login by password disabled:         no                                  
Primary group:                      test-user1                          
GID:                                1003                                
Hushed:                             no                                  
Password expiration warn interval:  7                                   
Password changed:                   10:00                               
Maximum change time:                99999                               
Running processes:                  0                                   

Last logs:

# lslogins test-user2
Username:                           test-user2                          
UID:                                1004                                
Gecos field:                                                            
Home directory:                     /home/test-user2                    
Shell:                              /bin/bash                           
No login:                           no                                  
Password is locked:                 no                                  
Password not required (empty):      yes                                 
Login by password disabled:         no                                  
Primary group:                      test-user2                          
GID:                                1004                                
Hushed:                             no                                  
Password expiration warn interval:  7                                   
Password changed:                   10:00                               
Maximum change time:                99999                               
Running processes:                  0                                   

Last logs:

# lslogins -V
lslogins from util-linux 2.32.1

Comment 11 errata-xmlrpc 2023-05-16 09:12:29 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 (util-linux 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:3054


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