[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-logonpy/usr/share/se3/shares/shares.avail/ -> no-gpo-upload.sh (source)

   1  #!/bin/bash
   2  #shares_WinXP: netlogon
   3  #shares_Win2K: netlogon
   4  #shares_Vista: netlogon
   5  #action: start
   6  #level: 01
   7  
   8  [ ! -f /home/netlogon/machine/$2/no-gpo-upload.lck ] && exit 0
   9  [ "$1" == "adminse3" ] && exit 0 # CPAU.exe
  10  
  11  if [ -e /etc/se3/config_m.cache.sh ]; then
  12      . /etc/se3/config_m.cache.sh
  13  else
  14      source /var/se3/Progs/install/installdll/confse3.ini
  15      se3ip="$(echo $ip_se3|sed -e 's/\r//g')"
  16      se3-domain="$(echo $domaine|sed -e 's/\r//g')"
  17  fi
  18  adminse3="adminse3"
  19  
  20  
  21  /usr/share/se3/logonpy/logon.py $1 $2 $4
  22  
  23  if [ ! -f /home/netlogon/machine/$2/gpt.ini ]
  24  then
  25      cp -f /home/netlogon/gpt.ini /home/netlogon/machine/$2/gpt.ini
  26  else
  27      GPO_VERS="$(grep Version /home/netlogon/machine/$2/gpt.ini|cut -d '=' -f2|sed -e 's/\r//g')"
  28      (( GPO_VERS+=1 ))
  29      sed -i "s/Version=.*/Version=$GPO_VERS\r/g" /home/netlogon/machine/$2/gpt.ini
  30  fi
  31  
  32  if [ "$4" == "Vista" ]
  33  then
  34      SHARECMD="net share C\$=C: /GRANT:adminse3,FULL"
  35  else
  36      SHARECMD="net share C\$=C:"
  37  fi
  38  
  39  sed -e s/%se3ip%/"$se3ip"/g /home/netlogon/EnableGPO.bat|sed -e s/%machine%/"$2"/g|sed -e s_%sharecmd%_"$SHARECMD"_g|sed s/%user%/$1/g|sed -e s/%domain%/$se3_domain/g|sed -e s/netsh.*//g|sed -e s/.*printers.*//g > /home/netlogon/machine/$2/EnableGPO.bat
  40  echo '\\'"$se3ip"'\netlogon\cpau.exe' -wait -lwop -hide -dec -file '\\'"$se3ip"'\netlogon\machine\gpo_helper.job' > /home/netlogon/machine/$2/fallback.bat
  41  echo '\\'"$se3ip"'\netlogon\machine\\'"$2\logon.bat" >>/home/netlogon/machine/$2/fallback.bat


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