Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1512701

Summary: passwd --stdin does not work with long passwords
Product: Red Hat Enterprise Linux 7 Reporter: Ondrej Moriš <omoris>
Component: passwdAssignee: Miloslav Trmač <mitr>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.4   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-13 21:33:23 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:

Description Ondrej Moriš 2017-11-13 21:30:30 UTC
Description of problem:

When a password longer than 79 characters is given to passwd by:

# echo <password> | passwd --stdin TestUser

password is not stored correctly. When such password is set normally (interactively) via:

# passwd TestUser
New password: <password>

it works fine. Also, password longer than 79 characters works fine when set by:

# lpasswd -P <password> TestUser

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:

1. useradd TestUser
2. for i in $(seq 1 80); do echo -n 'x'; done | passwd --stdin TestUser
3. ssh TestUser@localhost

Actual results:

# ssh TestUser@localhost
TestUser@localhost's password: 
Permission denied, please try again.

Expected results:

Successful authentication.

Additional info:

Passwords with at most 79 characters works. Moreover, this is a regression from RHEL6. It worked there.

Comment 2 Miloslav Trmač 2017-11-13 21:33:23 UTC

*** This bug has been marked as a duplicate of bug 1276570 ***