Bug 37971 - useradd -p and usermod -p not encrypting password
useradd -p and usermod -p not encrypting password
Product: Red Hat Linux
Classification: Retired
Component: setup (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
: Security
Depends On:
  Show dependency treegraph
Reported: 2001-04-26 23:06 EDT by Joe Thompson
Modified: 2014-03-16 22:20 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-04-26 23:06:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joe Thompson 2001-04-26 23:06:26 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Using useradd -p [password] or usermod -p [password] does not encrypt the 
password in the /etc/shadow file. Using any combination of double quotes, 
single quotes or back ticks makes no difference either. Using passwd --
stdin < [filename with password in it] DOES encrypt the password.

Reproducible: Always
Steps to Reproduce:
1.useradd joe -p password
2.usermod joe -p password

Actual Results:  vi /etc/shadow


Expected Results:  vi /etc/shadow

Comment 1 Bill Nottingham 2001-04-26 23:11:05 EDT
From the man page:

       -p passwd
              The  encrypted password, as returned by crypt(3) or
              an MD5 password generator.  The default is to  dis-
              able the account.

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