LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-17-2014, 01:06 PM   #1
vahab
Member
 
Registered: Jun 2011
Posts: 58

Rep: Reputation: Disabled
OpenLDAP sha512 shadow does not work


Hello,
I have configured openldap 2.4 for authenticating linux clients.
When I set the shadow of a user with "ssha" algorithm it works fine but when I change it to SHA512 it does not work.
My client is redhat 6.4 and it accepts SHA512 shadows for local accounts but for LDAP accounts it does not work.
Do I need to add something to my LDAP server ?

Thanks in advance,
Vahab
 
Old 04-17-2014, 02:12 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,797

Rep: Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002
Quote:
Originally Posted by vahab View Post
Hello,
I have configured openldap 2.4 for authenticating linux clients. When I set the shadow of a user with "ssha" algorithm it works fine but when I change it to SHA512 it does not work. My client is redhat 6.4 and it accepts SHA512 shadows for local accounts but for LDAP accounts it does not work.
Do I need to add something to my LDAP server ?
Did you try looking at the openLDAP documentation, where it tells you how to configure this, and how to test it??
http://www.openldap.org/devel//cvswe...0&sortbydate=1

And since you're using RHEL 6.4, have you contacted Red Hat for assistance, since you're PAYING FOR RHEL, right?? They also have a set of openLDAP documentation on their knowledgebase, which (as a paying subscriber), you have access to.
 
1 members found this post helpful.
Old 04-17-2014, 08:02 PM   #3
vahab
Member
 
Registered: Jun 2011
Posts: 58

Original Poster
Rep: Reputation: Disabled
No I just googled and there was nothing useful. I will follow based on doc then.

actually where I live there is no support for RHEL or professionals like you to help and here is my only hope to find a clue and in this case I think is enough to proceed.
Thank you
 
Old 04-17-2014, 08:53 PM   #4
vahab
Member
 
Registered: Jun 2011
Posts: 58

Original Poster
Rep: Reputation: Disabled
It worked and to let the others who are reading this know :

You need to obtain openldap source

cd openldap-2.4.39
cd ./contrib/slapd-modules/passwd/sha2
make
cp .libs/pw-sha2.so /usr/lib64/openldap


Then you need to load it this way :
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModuleLoad: pw-sha2
olcModulePath: /usr/lib64/openldap

/etc/init.d/slapd restart

From now on, SHA512 hashes would work !
 
Old 04-18-2014, 09:21 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,797

Rep: Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002Reputation: 8002
Quote:
Originally Posted by vahab View Post
No I just googled and there was nothing useful. I will follow based on doc then.
Sorry, but Google has LOTS of information that is useful, and reading/following the instructions should be the absolute FIRST thing you do for ANY problem.
Quote:
actually where I live there is no support for RHEL or professionals like you to help and here is my only hope to find a clue and in this case I think is enough to proceed.
Sorry, that's wrong. Anyone can call Red Hat on the phone, from anywhere in the world. You can also email them from anywhere with an Internet connection (which you obviously have), and you can also get online help. If you're paying for RHEL, you have MANY options on how to contact them.
 
Old 03-11-2016, 12:41 AM   #6
ariveamar
LQ Newbie
 
Registered: Mar 2016
Posts: 1

Rep: Reputation: Disabled
But in this section actually you need to edit file "Makefile" and specify LDAP source root right ?
I already specified the soruce root openldap on the path "/etc/openldap/" but still erorr like below :


[root@mail sha2]# make
../../../../libtool --mode=compile gcc -g -O2 -Wall -I../../../../include -I../../../../include -I../../../../servers/slapd -c slapd-sha2.c
make: ../../../../libtool: Command not found
make: *** [slapd-sha2.lo] Error 127

Anyone can help me to solve this case.

Thanks & Regards,

Arief

Quote:
Originally Posted by vahab View Post
It worked and to let the others who are reading this know :

You need to obtain openldap source

cd openldap-2.4.39
cd ./contrib/slapd-modules/passwd/sha2
make
cp .libs/pw-sha2.so /usr/lib64/openldap


Then you need to load it this way :
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModuleLoad: pw-sha2
olcModulePath: /usr/lib64/openldap

/etc/init.d/slapd restart

From now on, SHA512 hashes would work !
 
Old 09-14-2016, 09:19 AM   #7
anyk
LQ Newbie
 
Registered: Sep 2016
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by ariveamar View Post
[root@mail sha2]# make
../../../../libtool --mode=compile gcc -g -O2 -Wall -I../../../../include -I../../../../include -I../../../../servers/slapd -c slapd-sha2.c
make: ../../../../libtool: Command not found
make: *** [slapd-sha2.lo] Error 127

Anyone can help me to solve this case.
Go to the openldap source root directory and run `./configure` first. That creates the libtool script your compiler was complaining about. When you did not compile openldap before, doing so by running `make` is the easiest way to get the dependencies compiled.

e.g. on Debian

Code:
apt-get install git-core build-essential libtool

git clone git://git.openldap.org/openldap.git /usr/src/openldap
cd /usr/src/openldap
./configure
make

cd contrib/slapd-modules/passwd/sha2
make

cp .libs/pw-sha2.so /usr/lib/ldap/

Last edited by anyk; 09-14-2016 at 09:22 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Issues with OpenLDAP on 13.37 with NSS_LDAP using SHA512 ThatItGuy10499 Slackware 1 06-09-2012 08:37 PM
Shadow doesn't work SuperGnu Linux - Software 4 11-21-2010 10:18 AM
mod_auth_mysql sha512 ?? twproductions Linux - Server 1 06-10-2009 05:31 PM
Why does sgid shadow does not work? PhoenixHawk Linux - Security 0 07-28-2005 07:51 AM
OpenLDAP, nss_ldap, pam_ldap and shadow account info pshinpaugh Linux - General 2 08-16-2004 08:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration