Ubuntu Server Guide
Download 1.23 Mb. Pdf ko'rish
|
ubuntu-server-guide (1)
- Bu sahifa navigatsiya:
- Change the rootDN password
Adding an index
Use ldapmodify to add an “Index” to your {1}mdb,cn=config database definition (for dc=example,dc=com). Create a file, call it uid_index.ldif, with the following contents: dn : o l c D a t a b a s e ={1}mdb , cn=c o n f i g add : olcDbIndex olcDbIndex : m a i l eq , sub Then issue the command: $ sudo l d a p m o d i f y −Q −Y EXTERNAL −H l d a p i : / / / −f uid_index . l d i f m o d i f y i n g e n t r y ” o l c D a t a b a s e ={1}mdb , cn=c o n f i g ” You can confirm the change in this way: $ sudo l d a p s e a r c h −Q −LLL −Y EXTERNAL −H l d a p i : / / / −b \ cn=c o n f i g ’ ( o l c D a t a b a s e ={1}mdb) ’ olcDbIndex dn : o l c D a t a b a s e ={1}mdb , cn=c o n f i g olcDbIndex : o b j e c t C l a s s eq olcDbIndex : cn , u i d eq olcDbIndex : uidNumber , gidNumber eq olcDbIndex : member , memberUid eq olcDbIndex : m a i l eq , sub 193 Change the rootDN password: First, run slappasswd to get the hash for the new password you want: $ s l a p p a s s w d New password : Re−e n t e r new password : {SSHA}VKrYMxlSKhONGRpC6rnASKNmXG2xHXFo Now prepare a changerootpw.ldif file with this content: dn : o l c D a t a b a s e ={1}mdb , cn=c o n f i g changetype : modify r e p l a c e : olcRootPW olcRootPW : {SSHA}VKrYMxlSKhONGRpC6rnASKNmXG2xHXFo Finally, run the ldapmodify command: $ sudo l d a pm o d i f y −Q −Y EXTERNAL −H l d a p i : / / / −f changerootpw . l d i f m o d i f y i n g e n t r y ” o l c D a t a b a s e ={1}mdb , cn=c o n f i g ” We still have the actual cn=admin,dc=example,dc=com dn in the dc=example,dc=com database, so let’s change it too. Since this is a regular entry in this database suffix, we can use ldappasswd: $ ldappasswd −x −D cn=admin , dc=example , dc=com −W −S New password : Re−e n t e r new password : Enter LDAP Password : <−− c u r r e n t password , about t o be changed Download 1.23 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling