Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-6279

lslogins - Login by password disabled incorrect

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • None
    • Important
    • rhel-plumbers
    • ssg_core_services
    • 3
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None
    • 57,005

      Description of problem:
      lslogins output of 'Login by password disabled' is incorrect

      Version-Release number of selected component (if applicable):
      util-linux-2.32.1-39.el8_7

      How reproducible:
      always

      Steps to Reproduce:
      1. lslogins testuser

      Actual results:
      Login by password disabled: no

      Expected results:
      Login by password disabled: yes

      Additional info:

      If I am reading this correctly.

      ------------------------
      case COL_PWDDENY:
      if (shadow) {
      const char *p = shadow->sp_pwdp;

      while (p && (p == '!' || *p == ''))
      p++;

      if (p && *p && p != shadow->sp_pwdp && !valid_pwd(p))
      user->pwd_deny = STATUS_TRUE;
      } else
      user->pwd_deny = STATUS_UNKNOWN;
      break;
      ------------------------

      Using

      1. grep testuser /etc/shadow
        testuser:!!:19305:0:99999:7:::

      Should be yes as it was in util-linux-2.32.1-35.el8.

      1. rpm -q util-linux
        util-linux-2.32.1-35.el8.x86_64
      1. lslogins testuser
        Username: testuser
        UID: 1000
        Gecos field:
        Home directory: /home/testuser
        Shell: /bin/bash
        No login: no
        Password is locked: no
        Password not required: no
        Login by password disabled: yes
        Primary group: testuser
        GID: 1000
        Supplementary groups: testgroup
        Supplementary group IDs: 12345
        Hushed: no
        Password expiration warn interval: 7
        Password changed: 2022-Nov08
        Maximum change time: 99999
        Running processes: 0
      1. rpm -q util-linux
        util-linux-2.32.1-39.el8_7.x86_64
      1. lslogins testuser
        Username: testuser
        UID: 1000
        Gecos field:
        Home directory: /home/testuser
        Shell: /bin/bash
        No login: no
        Password is locked: yes
        Password not required (empty): yes
        Login by password disabled: no
        Primary group: testuser
        GID: 1000
        Supplementary groups: testgroup
        Supplementary group IDs: 12345
        Hushed: no
        Password expiration warn interval: 7
        Password changed: 2022-Nov08
        Maximum change time: 99999
        Running processes: 0

              rhn-engineering-kzak Karel Zak
              rhn-support-ekeck Eugene Keck
              Karel Zak Karel Zak
              Radka Brychtova Radka Brychtova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: