Bug 50628 - lpasswd and luseradd -p set unusable passwords
Summary: lpasswd and luseradd -p set unusable passwords
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: libuser   
(Show other bugs)
Version: 7.3
Hardware: i386 Linux
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-08-01 18:47 UTC by Megan Bock
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-08-01 19:03:11 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Megan Bock 2001-08-01 18:47:46 UTC
Description of Problem:
Setting a password with either lpasswd or luseradd -p <newuser> results in 
an unusable password ("login incorrect" error). 

How Reproducible:
Consistently on Roswell.

Steps to Reproduce:
(as root)
1. cd /usr/sbin
2. ./luseradd <newuser> 
3. passwd <newuser>      // Try to log in on TTY2 as <newuser>. You should
                            be successful. Log back out and return to TTY1.
4. ./lpasswd -p <password> <newuser> 
5. su jsmith             // su will be successful, proving acount is valid
6. exit
7. exit                  // Try to log in on TTY2 as <newuser> with
                            <password>. This will fail. Go back to TTY1
8. passwd <newuser>      // Again log in on TTY2. You should be successful.

NOTE: luseradd -p <password> <newuser> also results in an unusable 

Actual Results:
Unusable accounts: useradd + lpasswd or luseradd + lpasswd
Usable accounts: useradd + passwd or luseradd + passwd

Expected Results:
Should be able to log in with new password.

Additional Information:
The standard passwd command can change a password that was set with either 
lpasswd or luseradd -p <newuser>.

Comment 1 Bill Nottingham 2001-08-01 19:03:06 UTC
You were passing a crypted password with -p, yes?

This works OK for me here.

Comment 2 Megan Bock 2001-08-01 20:11:27 UTC
User error: Intended to use plain password but transposed -p and -P options 
when reading --help on lpasswd. Carried error forward to luseradd. Works okay 
with -P option. Closing bug with apologies.

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