Issue 6890 - SHA2 Password Hashing not working
Summary: SHA2 Password Hashing not working
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-04 20:54 UTC by sudharma.thikkavarapu@siemens.com
Modified: 2014-08-01 21:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description sudharma.thikkavarapu@siemens.com 2011-04-04 20:54:33 UTC
Full_Name: SUDHARMA 
Version: $OpenLDAP: slapd 2.4.23 (Apr  4 2011 13:48:06)
OS: AIX
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (161.134.39.30)


Hello,

we are planning to encrypt the password using SHA2 so i have followed the steps
that are required to use slapd-modules/passwd/sha2 in openLDAP code. I have
modified the slapd.conf file to load the correct libraries etc.. when i try to
generate the hash value for a password i get the following error.

testdev# slappasswd -h {SHA512}
New password:
Re-enter new password:
Password generation failed for scheme {SHA512}: scheme not recognized

I have to mention that i had problems compiling the sha2 source code with the cc
compiler but when i use the xlc i had no issues and compiled the source
successfully.

Here are the commands 

xlc -I/home/openldap-2.4.23/include -g -c slapd-sha2.c
xlc -I/home/openldap-2.4.23/include -g -c sha2.c
xlc -G -I/home/openldap-2.4.23/include -g sha2.o slapd-sha2.o -o slapd-sha2.so

hope i haven't done anything wrong. Please suggest me how to make this work.
Thank you much for your help.


Best Regards,
Sudharma
Comment 1 Howard Chu 2014-05-09 11:12:12 UTC
changed notes
changed state Open to Closed
Comment 2 Ryan Tandy 2014-05-09 17:38:43 UTC
Hi,

This is fixed by ITS#7284, included since 2.4.32.

slappasswd -o module-load=pw-sha2 -h '{SHA512}'

thanks,
Ryan

Comment 3 Quanah Gibson-Mount 2014-05-13 11:22:29 UTC
changed notes
Comment 4 OpenLDAP project 2014-08-01 21:04:03 UTC
Dupe of ITS7284