2

I have configured ldap local server running centos 7, using this article: https://www.itzgeek.com/how-tos/linux/centos-how-tos/step-step-openldap-server-configuration-centos-7-rhel-7.html.

Now my LDAP server is running without any issue. In my ldap server firewall is disabled. However, selinux is enabled.

Also, I migrate my local users to ldap db using migrationtools and it was also successful.

Also, I install and configure phpldapadmin and it was also successful. Then I have connected my another ldap server as client (I installed sssd, krb5-workstation, and use authconfig-tui to connect), just for authentication.

When I test my ldap connectivity (from clientserver) using

[root@ldapclient ~]# getent passwd user1

user1:*:1001:1001:user1:/home/user1:/bin/bash

[root@ldapclient ~]# id user1

uid=1001(user1) gid=1001 groups=1001

[root@ldapclient ~]# id testfromphpldapadmin

uid=1003(testfromphpldapadmin) gid=1010(ldapusers) groups=1010(ldapusers)

(testfromphpldapadmin - create from using phpldapadmin user1 - user that migrate using migration tools)

according to the previous result, I was thinking that my ldap authentication just works without any issue

But when I tried to ssh using that ldap user accounts

login as: user1

user1@centclient's password:

Access denied
2

Note that for a successful login two things have to work:

  1. Name service switch configured in file /etc/nsswitch.conf
  2. PAM config as defined in various files in directoy /etc/pam.d

Since getent seems to return correct data your /etc/nsswitch.conf seems to be correct.

Then I'd check configuration in /etc/pam.d/common* whether it uses module pam_sss.so. And of course you should examine your logs.

  • Thanks for the answer, I didn't find any resolution at all. I will show you my /etc/nsswitch.conf and /etc/pam.d config file – Randeer Lalanga Nov 2 '18 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.