Live Chat Software by Kayako
Knowledgebase
Script para mudar um atributo no LDAP para todos usuarios
Posted by Jean Melo on 28/Aug 13:35

O script abaixo muda um determinado atributo no LDAP para todos os usuarios da base:

#!/bin/sh

set -xv

echo "setting ldap variables"

for i in `ldapsearch -o ldif-wrap=no -x -h 127.0.0.1 -D "cn=root,dc=proapps" -w senha | grep uid=| cut -d : -f 2 | sed 's/^\ //g'`

do

ldapmodify -o ldif-wrap=no -x -h 127.0.0.1 -D "cn=root,dc=proapps" -w senha << EOF

dn: $i

changetype: modify

replace: mailQuotaSize

mailQuotaSize: 0

EOF

done

(1 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
Help Desk Software by Kayako