admin scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.2 KiB

  1. WE FUCKING HATE THIS
  2. Stop the Ldap server daemon slapd
  3. Take diff using ldapsearch -xLLL -y /etc/ldap.secret -D cn=root,ou=ldap,o=redbrick > rb.ldif
  4. Run newyear_ldif.py against rb.ldif
  5. using syntax: newyear_ldif.py <rb.ldif >rb.decrement.ldif
  6. Change this to an Ldapmodify format using newyear_ldapmodify_ldif.py
  7. Using syntax: newyear_ldapmodify_ldif.py rb.decrement.ldif > rb.decrement.ldapUpload.ldif
  8. This breaks shit.
  9. Upload this broken ldif using:
  10. ldapmodify -x -D cn=root,ou=ldap,o=redbrick -y /etc/ldap.secret -f rb.decrement.ldapUpload.ldif
  11. Run Query against this DB using this command and output results to ldif.
  12. ldapsearch -D cn=root,ou=ldap,o=redbrick -y /etc/ldap.secret -xLLL "(|(objectClass=club)(objectClass=society)(objectClass=projects)(objectClass=redbrick)(objectClass=dcu)(objectClass=intersoc)(objectClass=founders))" > rb.preFix.ldif
  13. Run ldif_founder_soc_fix.py against rb.preFix.ldif
  14. using syntax: ldif_founder_soc_fix.py < rb.preFix.ldif > rb.Fix.ldif
  15. Change this to ldapmodify friendly format using:
  16. newyear_ldapmodify_ldif.py rb.Fix.ldif > rb.Fix.ldapUpload.ldif
  17. Upload shiny new ldif.
  18. ldapmodify -x -D cn=root,ou=ldap,o=redbrick -y /etc/ldap.secret -f rb.Fix.ldapUpload.ldif
  19. ????
  20. Profit!
  21. <3 zergless & koffee