I have text file, on each line there is ldap attribute taken from my LDAP, the attribute is 'uid', it looks like first and second name (example -> john.carter), so what I want to do is to write a bash script which will compare the uid's from the text file to the uid's from specific group of people in ldap and if there is a match I want to print another attribute from that group. My problem is with the comparison, i.e how to match the uid's from the text file to those from the Ldap. Any suggestions?
This is my ldapsearch: ldapsearch -H ldap://server -D "uid=name,ou=group,dc=some,dc=domain,dc=com" -w "example" -b "o=organizationName,ou=group,dc=some,dc=domain,dc=com" I suppose that it should be done with 'while - do,done' cycle, so the question is how to check if the uid's from:'o=organizationName,ou=group,dc=some,dc=domain,dc=com' are matched with the uid's from the text file, where in the text file they are sorted one uid on line: test.test test1.test1 ...