Weak password encryption used when changing NIS user password
This document (7023131) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 12
Situation
pam-config -a --unix --unix-sha512Which successfully resulted in changes to the /etc/pam.d/common-* files, including this line from common-password:
password required pam_unix.so use_authtok debug sha512 nis try_first_passFor the most part, this has taken effect. However, when NIS users change their password with the passwd command, the new password hash gets set using weaker encryption.
ypcat passwd | grep <username>It is clear in the ypcat data that before the change, a very long complex hash was present, and after the change, a rather short hash was present. (Note: In this NIS database, shadow data has been merged into passwd data.)
Resolution
Find and set these settings to sha512 (or whatever encryption is desired):
ENCRYPT_METHOD SHA512 ENCRYPT_METHOD_NIS SHA512For more information, also see "man pam_unix" as well as comments within /etc/login.defs.
Find and set these settings to sha512 (or whatever encryption is desired):
CRYPT=sha512 CRYPT_FILES=sha512 CRYPT_YP=sha512
Cause
Additional Information
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7023131
- Creation Date: 27-Jun-2018
- Modified Date:03-Nov-2020
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com