Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937337 - sys-auth/passwdqc: applying new password but notifying password unchanged
Summary: sys-auth/passwdqc: applying new password but notifying password unchanged
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-04 20:32 UTC by OzTiram
Modified: 2024-08-04 21:52 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description OzTiram 2024-08-04 20:32:17 UTC
I am trying to change my password using the suggestion from passwdqc, it says it failed, but it actually set the new password. This behavior is only encountered when running passwd as a normal user, not as root running `passwd <someuser>`:

$ sudo grep oznt /etc/shadow 
oznt:$2b$05$DxjpDG5gXZnZIDn....xlu:19939:0:99999:7:::
$ passwd 
Changing password for oznt.
Current password: 
Changing password for oznt.

You can now choose the new password or passphrase.

A valid password should be a mix of upper and lower case letters, digits, and
other characters.  You can use a password containing at least 7 characters
from all of these classes, or a password containing at least 8 characters
from just 3 of these 4 classes.
An upper case letter that begins the password and a digit that ends it do not
count towards the number of character classes used.

A passphrase should be of at least 3 words, 11 to 72 characters long, and
contain enough different characters.

Alternatively, if no one else can see your terminal now, you can pick this as
your password: "Cable7Peak4equate".

Enter new password: 
Re-type new password: 
passwd: Authentication failure
passwd: password unchanged
$ sudo grep oznt /etc/shadow 
oznt:$6$zvBdZOtIEPV...tl0:19939:0:99999:7:::



As you can see from the shadow file, the password is changed.
Comment 1 OzTiram 2024-08-04 21:24:42 UTC
I think this is not an actual bug. It might be related to my configuration.

$ diff /etc/pam.d/system-auth.backup.2024-08-04 /etc/pam.d/system-auth
3c3
< auth            [success=1 default=ignore]      pam_unix.so nullok  try_first_pass
---
> auth            [success=1 new_authtok_reqd=1 ignore=ignore default=bad]      pam_unix.so nullok  try_first_pass
9d8
< password	required	pam_unix.so try_first_pass use_authtok nullok blowfish shadow


It's a very old installation with blowfish passwords. Which might explain why it works properly for root (which does not have blowfish based password).
Comment 2 Mike Gilbert gentoo-dev 2024-08-04 21:52:22 UTC
Please re-open if you can reproduce the issue with an unaltered pam config or can point to an actual bug.