Skip to content
Snippets Groups Projects

correct ldap maildomain

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Dirk Sarpe
    Edited
    ldap_changemaildomain.sh 483 B
    # Replaces mail entries that have @uni-leipzig.de in the AD domain idiv.de
    # with corresponding mail entries of @idiv.de.
    # You need to have a kerberos ticket with sufficient credentials to modify AD
    
    ldapsearch -LLL -b 'dc=idiv,dc=de' 'mail=*@uni-leipzig.de' -H 'ldap://idivad1.idiv.de' mail | sed 's/\(mail: .*@\)uni-leipzig.de/changetype: modify\nreplace: mail\n\1idiv.de'/ > ldapmailentries_idiv_remaining.ldif
    
    ldapmodify -f ldapmailentries_idiv.ldif -H 'ldap://idivad1.idiv.de'
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment