[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3master/usr/share/se3/sbin/ -> migrationLenny.sh (source)

   1  #!/bin/bash
   2  
   3  #### ATTENTION
   4  #    Ne gere pas encore les comptes de Trash
   5  ###
   6  . /usr/share/se3/includes/config.inc.sh -cml
   7  
   8  # On cherche l'ip machine courante
   9  ldapsearch -xLLL -D $adminRdn,$ldap_base_dn -w $adminPw objectClass=person uid| grep uid:| cut -d ' ' -f2| while read uid
  10  do
  11          (
  12          echo "dn: uid=$uid,$peopleRdn,$ldap_base_dn"
  13          echo "changetype: modify"
  14          echo "replace: sambaPwdLastSet"
  15          echo "sambaPwdLastSet: 1"
  16          ) | ldapmodify -x -D $adminRdn,$ldap_base_dn -w $adminPw >/dev/null 2>&1
  17          if [ "$?" != "0" ]
  18          then
  19              #corbeille
  20                (
  21                      echo "dn: uid=$uid,ou=Trash,$ldap_base_dn"
  22                      echo "changetype: modify"
  23                      echo "replace: sambaPwdLastSet"
  24                      echo "sambaPwdLastSet: 1"
  25                      ) | ldapmodify -x -D $adminRdn,$ldap_base_dn -w $adminPw >/dev/null
  26  
  27          fi
  28  done


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1