Bug 37971

Summary: useradd -p and usermod -p not encrypting password
Product: [Retired] Red Hat Linux Reporter: Joe Thompson <jtsmoke>
Component: setupAssignee: Bill Nottingham <notting>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: rvokal
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-04-27 03:06:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Thompson 2001-04-27 03:06:26 UTC
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
3.
	

Actual Results:  vi /etc/shadow

joe:password:11439:0:99999:7:::

Expected Results:  vi /etc/shadow

joe:Qtqwk12KHnvgbOkD:11439:0:99999:7:::

Comment 1 Bill Nottingham 2001-04-27 03:11:05 UTC
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.