SRD

ldap login

SRD
Jan 28th, 2016
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. I'm trying to log into an LDAP client. Below I show a login from the ldap server to the ldap client, and another from a normal workstation on the same subnet to the ldap client. The workstation is able to login, but am not able to login from the ldap server.
  2.  
  3. server: OpenLDAP 2.4.43
  4. clients: nss-pam-ldapd 0.9.6
  5.  
  6. Any help much appreciated.
  7.  
  8. --- from ldap server to ldap client (fails)
  9. $ ssh -l james 10.0.1.2
  10. Enter passphrase for key '/home/james/.ssh/id_rsa':
  11. You are required to change your password immediately (root enforced)
  12. WARNING: Your password has expired.
  13. You must change your password now and login again!
  14. New password:
  15. Retype new password:
  16. password change failed: Server is unwilling to perform
  17. passwd: password updated successfully
  18. Connection to 10.0.1.2 closed.
  19.  
  20.  
  21. --- from worstation to ldap client (succeeds)
  22. $ ssh node-2
  23. Password:
  24. You are required to change your password immediately (root enforced)
  25. need a new password
  26. New password:
  27. Retype new password:
  28. password change failed: Insufficient access
  29. node-2(james):~$
  30.  
  31.  
  32.  
  33. $ ldapsearch -x -b 'dc=my,dc=example,dc=com' '(objectclass=*)'
  34. # extended LDIF
  35. #
  36. # LDAPv3
  37. # base <dc=my,dc=example,dc=com> with scope subtree
  38. # filter: (objectclass=*)
  39. # requesting: ALL
  40. #
  41.  
  42. # my.example.com
  43. dn: dc=my,dc=example,dc=com
  44. dc: cem
  45. objectClass: dcObject
  46. objectClass: organization
  47. o: CEM
  48.  
  49. # manager, my.example.com
  50. dn: cn=manager,dc=my,dc=example,dc=com
  51. objectClass: organizationalRole
  52. cn: Manager
  53. description: LDAP Admin
  54.  
  55. # groups, my.example.com
  56. dn: ou=groups,dc=my,dc=example,dc=com
  57. ou: groups
  58. description: Groups
  59. objectClass: organizationalUnit
  60.  
  61. # users, my.example.com
  62. dn: ou=users,dc=my,dc=example,dc=com
  63. ou: users
  64. description: Users
  65. objectClass: organizationalUnit
  66.  
  67. # james, groups, my.example.com
  68. dn: cn=james,ou=groups,dc=my,dc=example,dc=com
  69. cn: james
  70. objectClass: top
  71. objectClass: posixGroup
  72. gidNumber: 1000
  73.  
  74. # james, users, my.example.com
  75. dn: uid=james,ou=users,dc=my,dc=example,dc=com
  76. cn: James
  77. uid: james
  78. uidNumber: 1000
  79. gidNumber: 1000
  80. sn: James
  81. homeDirectory: /home/james
  82. objectClass: top
  83. objectClass: person
  84. objectClass: organizationalPerson
  85. objectClass: inetOrgPerson
  86. objectClass: posixAccount
  87. objectClass: shadowAccount
  88. loginShell: /bin/bash
  89. gecos: james
  90. shadowLastChange: 0
  91. userPassword:: e1NTSEF9ZjhRMGwwaDk1ek9mMUViaDhreDNlUEsvdFhFb29wV3I=
  92. shadowMax: 9999
  93. shadowWarning: 14
  94.  
  95. # search result
  96. search: 2
  97. result: 0 Success
  98.  
  99. # numResponses: 7
  100. # numEntries: 6
  101.  
  102.  
  103. /etc/pam.d/system-auth
  104. ---
  105. auth required pam_env.so
  106. auth sufficient pam_unix.so try_first_pass likeauth nullok
  107. auth sufficient pam_ldap.so use_first_pass
  108. auth required pam_deny.so
  109.  
  110. account required pam_unix.so
  111. account [default=bad success=ok user_unknown=ignore] pam_ldap.so
  112. account optional pam_permit.so
  113.  
  114. password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
  115. password sufficient pam_unix.so try_first_pass use_authtok nullok sha512 shadow
  116. password sufficient pam_ldap.so use_authtok use_first_pass
  117. password optional pam_permit.so
  118.  
  119. session required pam_limits.so
  120. session required pam_env.so
  121. session optional pam_ldap.so
  122. session required pam_unix.so
  123. session optional pam_permit.so
Advertisement
Add Comment
Please, Sign In to add comment