Red Hat Bugzilla – Bug 829463
login.defs man page contradicts to authconfig actual actions
Last modified: 2012-11-19 12:23:23 EST
Description of problem:
According to man login.defs, ENCRYPT_METHOD=SHA512 overrides MD5_CRYPT_ENAB.
Manually changing ENCRYPT_METHOD to MD5 does not change the system to use MD5 hashed password.
Using 'system-config-authentication' or 'authconfig --enablemd5 --update' to change to MD5, adds to /etc/login.defs the MD5_CRYPT_ENAB=yes. And then MD5 works.
Version-Release number of selected component (if applicable):
RHEL 6.0, 6.1, 6.2
Steps to Reproduce:
passwd <user> creates a $6$ hashed password in /etc/shadow
passwd <user> should create a $1$ hashed password in /etc/shadow
It looks that something is missing from the man page of login.defs
login.defs(5) is man page in shadow-utils package. Reassigning to the correct component.
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.
Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Actually the reason why the authconfig call is needed is that not only login.defs has to be set but - for the passwd program especially - the system PAM configuration in /etc/pam.d/system-auth must be changed. And that is what authconfig does. The MD5_CRYPT_ENAB in login.defs is legacy and not needed.