This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |