admin scripts
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

check_if_emails_in_ldap.sh 341 B

1234567891011121314
  1. #! /bin/bash
  2. # Input : a file with a list of email addresses (one address per line)
  3. # Check if the email is in our ldap, if not return the email address.
  4. FILE=/home/aziz/emails.new
  5. while read line
  6. do
  7. if [ -z "$(ldapsearch -D cn=root,ou=ldap,o=redbrick -xLLL -y /etc/ldap.secret "altmail=$line" uid)" ]
  8. then
  9. echo $line
  10. fi
  11. done <$FILE