I would lke to read the contents of a file in a bourne shell script containing a user IDs and run them against an ldapsearch command. Here's the following section which doesn't seem to work:
for id in /var/tmp/ldap_user_problems_sort.log ;
/usr/bin/ldapsearch -h DEVLDAP_TREE "(&(hcscteamsiterole=*)(uid=$ACCOUNT)(!(gecos=*)))" fullname gecos >>$LOGFILE 2>&1
The above section does not throw an error, but I get no output. If I run the ldapsearch command inserting a real UID in place of the variable, I get data. Could someone out there let me know what I'm doing wrong here? Thanks!