sshd[902]: debug1:PAM: password authentication failed for an illegal user: Authentication failure

If you are getting the error when you configured pam_ldap for the backend ssh authentication.

Ensure to uncomment following lines in /etc/ldap.conf

# RFC 2307 (AD) mappings
nss_map_objectclass posixAccount user
#nss_map_objectclass shadowAccount user
nss_map_attribute uid sAMAccountName
nss_map_attribute homeDirectory unixHomeDirectory

 Restart the nscd service.

service nscd restart

 The following commands should now return a result from AD/LDAP.
 
[email protected]:~# getent passwd james
james:*:10003:11000:james:/home/james:/usr/local/bin/ezsh
 
[email protected]:~# finger james
Login: james                      Name: james
Directory: /home/james                  Shell: /usr/local/bin/ezsh
On since Thu Feb  1 14:23 (IST) on pts/1 from 192.168.56.1
   1 hour 47 minutes idle
No mail.
No Plan.



0 (0)
Article Rating (No Votes)
Rate this article
    Attached Files
    There are no attachments for this article.
    Related Articles RSS Feed
    Can’t connect to local MySQL server through socket /tmp/mysql.sock
    Viewed 3769 times since Thu, Jun 15, 2017
    Will i be able to access my server if the ezeelogin license server goes down?
    Viewed 1618 times since Wed, Jun 14, 2017
    Disabling reCAPTCHA
    Viewed 2087 times since Wed, Jun 14, 2017
    error log file and configuration file to troubleshoot
    Viewed 1689 times since Thu, Jun 15, 2017
    How to disable web terminal appllication in Cpanel ?
    Viewed 1804 times since Fri, Jun 29, 2018
    License expired though its not time / How to flush license / Number of servers exceeds maximum limit
    Viewed 3334 times since Wed, Jun 14, 2017
    User add failed Cannot add user on this node: REMOTE HOST IDENTIFICATION HAS CHANGED!
    Viewed 3680 times since Wed, Jun 14, 2017
    NODE_RDP_PROTOCOL_X224_NEG_FAILURE()
    Viewed 2175 times since Fri, Feb 2, 2018
    Configure Automatic su or sudo
    Viewed 3478 times since Thu, Jun 15, 2017
    Unable to open ssh session
    Viewed 2140 times since Thu, Jun 15, 2017