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

usermod -e doesn't reflect timezone properly on RHEL10

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-10.0
    • shadow-utils
    • None
    • Yes
    • Low
    • rhel-sst-idm-sssd
    • ssg_idm
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?

      During testing lslogins - checking the password expiration value I noticed change of behavior for RHEL10 . The value in /etc/shadows could differ when changing timezones with timedatectl

      With timezone America/New_York it works properly

       

      Please provide the package NVR for which the bug is seen:

      shadow-utils-4.15.0-3.el10.x86_64

      How reproducible is this bug?:

      Steps to reproduce

      1. useradd alice
      2. timedatectl # check timezone ( My example Time zone: America/New_York )
      3. timedatectl set-timezone 'Europe/Prague'
      4. usermod -e 2024-12-31 alice
      5. cat /etc/shadow |grep alice    ############ last digit does not reflect time zone anymore

      Expected results

      RESULTS FROM RHEL-9

      1. timedatectl
                       Local time: Tue 2024-09-17 06:35:04 EDT
                   Universal time: Tue 2024-09-17 10:35:04 UTC
                         RTC time: Tue 2024-09-17 10:35:04
                        Time zone: America/New_York (EDT, -0400)
        System clock synchronized: no
                      NTP service: active
                  RTC in local TZ: no

      #timedatectl set-timezone 'Europe/Prague'

      1. usermod -e 2024-12-31 alice
      2. cat /etc/shadow |grep alice
        alice:!!:19983:0:99999:7::20088:     <----------- last digit
      3. TZ=UTC date --date=@$((20088 * 86400))
        Tue Dec 31 12:00:00 AM UTC 2024

      Actual results

      Results from RHEL-10

      1. timedatectl
                       Local time: Tue 2024-09-17 06:35:00 EDT
                   Universal time: Tue 2024-09-17 10:35:00 UTC
                         RTC time: Tue 2024-09-17 10:35:00
                        Time zone: America/New_York (EDT, -0400)
        System clock synchronized: no
                      NTP service: active
                  RTC in local TZ: no

      #timedatectl set-timezone 'Europe/Prague'

      1.  usermod -e 2024-12-31 alice
      2. cat /etc/shadow |grep alice
        alice:!:19983:0:99999:7::20087:              <--------- last digit
      3. TZ=UTC date --date=@$((20087 * 86400))
        Mon Dec 30 12:00:00 AM UTC 2024

              ipedrosa@redhat.com Iker Pedrosa
              rskvaril@redhat.com Radka Brychtova
              Iker Pedrosa Iker Pedrosa
              Anuj Borah Anuj Borah
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: