OpenLDAP, a login system will change the password

Source: Internet
Author: User
Tags ldap openldap

Http://guodayong.blog.51cto.com/263451/d-2 Guo Dayong's Blog

1: Modify the configuration file

Open the comment in front moduleload Ppolicy.lamodulepath/usr/lib/openldapmodulepath/usr/lib64/openldap also precede the database config with these two paragraphs        Access to Attrs=userpassword by self write by anonymous auth by dn= "cn=captain,dc=le,dc=com" write by * None access to * by dn= ' cn=captain,dc=le,dc=com ' write by * read at the end add
Overlay PpolicyPpolicy_default cn=captain,ou=policy,dc=le,dc=com 2: Rebuild the database and load SLAPDRm-rf/etc/openldap/slapd.d/*[[email protected] ~]# slaptest-f/etc/openldap/slapd.conf-f/etc/openldap/ Slapd.dconfig file testing Succeeded[[email protected] ~]# chown-r ldap.ldap/etc/openldap/*[[email protected] ~]# chown -R ldap.ldap/var/lib/ldap[[email protected] ~]#/ETC/INIT.D/SLAPD Restart 3: You can see that the ppolicy.la module is already loaded, and you can see that it's in there. 4: Edit Cat 1.ldif dn:ou=pwpolicies,dc=le,dc=comobjectclass:organizationalunitou:pwpolicies ldapadd-x-D "CN=CAPTAIN,DC =le,dc=com "-w-f 1.ldif added to see more from Phpldapadmin Add Some property values for this cn=captain,ou=pwpolicies,dc=le,dc=com [[email protected] ~]# cat 2.ldif dn:cn=captain,ou=pwpolicies,dc=le,dc=comcn:captainobjectclass: PwdPolicyobjectClass:personpwdAllowUserChange:TRUEpwdAttribute:userPasswordpwdExpireWarning: 259200pwdfailurecountinterval:0pwdgraceauthnlimit:5pwdinhistory:5pwdlockout:truepwdlockoutduration: 300pwdmaxage:2592000pwdmaxfailure:5pwdminage:0pwdminlength:8pwdmustchange:truepwdsafemodify:truesn:dummy value& nbsp; then import: Ldapadd-x-D "cn=captain,dc=le,dc=com"-w-f 2.ldif    then modifies the user's properties [[email protected] ~]# Cat modify.ldif dn:uid=test5,ou=people,dc=le,dc=comchangetype:modifyreplace:pwdresetpwdreset:true  Ldapmodify-x-D "cn=captain,dc=le,dc=com"-w-f modify.ldif   Import  ldapwhoami-x-D UID=TEST5,OU=PEOPLE,DC=LE,DC =com-w-E ppolicy-v View policy information for TEST5 users     then test: SSH [email protected], always error, not change:   This is because the configuration file changed:  this content does not use the LDAP correct form:     If passwd cannot change the password, it is because, did not add, Samba is followed by the addition of Samba SambalmpassworD,sambantpassword access to attrs=userpassword        by self write        by Ano Nymous auth        by dn= ' cn=captain,dc=le,dc=com ' write        by * NONE ACC ESS to *        by self write        by dn= "Cn=captain,dc=le,dc=com" write  & nbsp     by * read  

OpenLDAP, change password on login system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.