Skip to content

Instantly share code, notes, and snippets.

View mchudgins's full-sized avatar

Mike Hudgins mchudgins

  • Kansas City, MO
View GitHub Profile
@mchudgins
mchudgins / createUsers.sh
Created February 28, 2018 02:29
create users for testing with OpenLDAP
#! /usr/bin/env bash
cat << EOF >/tmp/test.ldif
dn: ou=People,dc=dstcorp,dc=io
objectClass: organizationalUnit
ou: People
dn: uid=jsmith,ou=People,dc=dstcorp,dc=io
changetype: add
objectClass: inetOrgPerson
@mchudgins
mchudgins / new_gist_file_0
Last active April 29, 2019 15:39
ldap & employer details queries
# make a bind call to the ldap server
ldapsearch -v -x -w <pword> -H ldaps://10.192.163.15:636/ -D 'dt<associate id>@ad.dstsystems.com' -b 'dc=ad,dc=dstsystems,dc=com' '(&(&(objectclass=user)(objectcategory=person))(cn=dt<associate id>))'
attributes of interest are:
mail (is their email addr)
DSTPreferredFirst
DSTPreferredLast
title
description (department name?)
telephoneNumber