There are several ways you can look up a user on our systems given their first and last name, such as their first.last Tufts email address. Most commonly useful is by last name:
% ldapsearch -x sn=lastname uid
For common last names like Smith or Lee, you can use first name:
% ldapsearch -x givenname=firstname uid
For cases where both names are fairly common, you can combine them in LDAP’s somewhat arcane Boolean syntax:
% ldapsearch -x '(&(sn=lastname)(givenname=firstname))' uid
The trailing ‘uid’ on all these queries tells the LDAP server to return only the uid field, rather than the whole record.
If nothing shows up on our LDAP server or if there are two or more people with the same first and last name, and you happen to have their Tufts email address, you can also ask the main campus LDAP server about the email address directly. Note: do not construct the email address yourself! For common firstname.lastname pairs, the first person with that pair gets the actual firstname.lastname; everyone else gets a different variant with a numeric tail.
% ldapsearch -x -h ldap.tufts.edu -b dc=tufts,dc=edu mail='firstname.lastname@tufts.edu' uid
Then take that returned UID (which is their UTLN) and ask our LDAP server what the student’s UID here might be:
% ldapsearch -x eecstuftsedupersonutln=utln uid
Note that this search will be slow, as eecstuftsedupersonutln is not an indexed column on our LDAP database.
Alternately, you can use the main campus TRUNK ID to make the same daisy chain:
% ldapsearch -x -h ldap.tufts.edu -b dc=tufts,dc=edu mail='firstname.lastname@tufts.edu' tuftsedutrunk % ldapsearch -x eecstuftsedupersontrunkid=tuftstrunkidnumber uid
eecstuftsedupersontrunkid is also not indexed, and the search will again be slow.
Main campus UTLN/UID and CS/ECE UID usually, but do not always, match. The daisy-chains can come in handy for the UTLN and CS/ECE UID do not match. People with non-matching UIDs include all of the faculty, most of the staff, and many of the grad students.