CHTJonas

Querying Blue AD

Apr 28th, 2020
55
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # How to query blue.cam.ac.uk Active Directory.
  2. # Original credit to mgk25 for these instructions.
  3. # Reworked and adapted by eb677.
  4. # Shared in #srcf IRC.
  5. # https://www.jrebel.com/sites/rebel/files/blog-images/2015/09/erlang-map-reduce-comic.jpg
  6.  
  7. $ sudo apt-get install krb5-user ldap-utils libsasl2-modules-gssapi-mit
  8. $ export KRB5CCNAME=`mktemp -u /tmp/krb5cc_${USER}_blue_XXXXX`
  9. $ kinit ${USER}@BLUE.CAM.AC.UK && bash
  10. Password for .....@BLUE.CAM.AC.UK: [type in your UIS/BLUE password]
  11.  
  12. Then, to look at the state of CN=spqr2, use
  13.  
  14. $ ldapsearch -Y GSSAPI -H ldap://dc3.blue.cam.ac.uk -b DC=blue,DC=cam,DC=ac,DC=uk -E pr=1000/noprompt CN=spqr2
RAW Paste Data