SRD

changepw

SRD
Jan 8th, 2016
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. server: OpenLDAP 2.4.43
  2. clients: nss-pam-ldapd 0.9.6
  3.  
  4. Using 'sudo cmd' on the server side results in messages like this ...
  5. sudo /etc/init.d/nslcd status
  6. Password;
  7. sudo: Account or passwd is expired, reset your password and try again
  8. sudo: unable to change expired password: Authentication token manipulation error
  9.  
  10. My user account expiry information is set as:
  11. $ chage -l james
  12. Last password change : Jan 09, 2016
  13. Password expires : never
  14. Password inactive : never
  15. Account expires : never
  16. Minimum number of days between password change : 0
  17. Maximum number of days between password change : 99999
  18. Number of days of warning before password expires : 7
  19.  
  20. If I try to set my passwd, I get this ...
  21. $ passwd
  22. Changing password for james.
  23. (current) UNIX password:
  24. New password:
  25. Retype new password:
  26. password change failed: Invalid credentials
  27. passwd: password updates successfully
  28.  
  29. /etc/pam.d/system-auth on client/server
  30. ---
  31. auth required pam_env.so
  32. auth required pam_unix.so try_first_pass likeauth nullok
  33. auth optional pam_permit.so
  34. auth sufficient pam_ldap.so use_first_pass
  35. account required pam_unix.so
  36. account optional pam_permit.so
  37. account sufficient pam_ldap.so
  38. password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
  39. password required pam_unix.so try_first_pass use_authtok nullok sha512 shadow
  40. password optional pam_permit.so
  41. password sufficient pam_ldap.so use_authtok use_first_pass
  42. session required pam_limits.so
  43. session required pam_env.so
  44. session required pam_unix.so
  45. session optional pam_permit.so
  46. session optional pam_ldap.so
  47.  
  48. /etc/nslcd.conf on client/server
  49. ---
  50. uid nslcd
  51. gid nslcd
  52. uri ldap://10.10.10.100/
  53. base dc=my,dc=example,dc=com
  54.  
  55. /etc/nsswitch.conf on client
  56. ---
  57. passwd: files ldap
  58. shadow: files ldap
  59. group: files ldap
  60.  
  61. hosts: files dns
  62. networks: files dns
  63.  
  64. services: db files
  65. protocols: db files
  66. rpc: db files
  67. ethers: db files
  68. netmasks: files
  69. netgroup: files
  70. bootparams: files
  71.  
  72. automount: files
  73. aliases: files
  74.  
  75.  
  76. /etc/openldap/ldap.conf on server/client
  77. ---
  78. host 10.10.10.100
  79. base dc=my,dc=example,dc=com
  80. uri ldap://10.10.10.100/
  81. ldap_version 3
  82. pam_password exop
  83. pam_filter objectclass=posixAccount
  84. nss_reconnect_tries 4
  85. nss_reconnect_sleeptime 1
  86. nss_reconnect_maxsleeptime 16
  87. nss_reconnect_maxconntries 2
  88. nss_initgroups_ignoreusers ldap,openldap,mysql,syslog,root,postgres
Advertisement
Add Comment
Please, Sign In to add comment