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 - passwd --stdin does not work with long passwords
Summary: passwd --stdin does not work with long passwords
Keywords:
Status: CLOSED DUPLICATE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: passwd
Version: 7.4
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Miloslav Trmač
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-13 21:30 UTC by Ondrej Moriš
Modified: 2017-11-13 21:33 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-13 21:33:23 UTC


Attachments (Terms of Use)

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):

passwd-0.79-4.el7

How reproducible:

100%

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 ***


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