Red Hat Bugzilla – Bug 50628
lpasswd and luseradd -p set unusable passwords
Last modified: 2008-05-01 11:38:00 EDT
Description of Problem:
Setting a password with either lpasswd or luseradd -p <newuser> results in
an unusable password ("login incorrect" error).
Consistently on Roswell.
Steps to Reproduce:
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
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
Unusable accounts: useradd + lpasswd or luseradd + lpasswd
Usable accounts: useradd + passwd or luseradd + passwd
Should be able to log in with new password.
The standard passwd command can change a password that was set with either
lpasswd or luseradd -p <newuser>.
You were passing a crypted password with -p, yes?
This works OK for me here.
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.